[issue24991] Define instance mutability explicitly on type objects

2015-09-09 Thread Nick Coghlan

Nick Coghlan added the comment:

Also adding Trent Nelson to the nosy list, as I believe this capability could 
potentially be relevant to PyParallel.

The reason I say that is that if instance mutability (or the lack thereof) 
becomes a first class language concept, then we may be able to adopt a Rust 
style model where mutability can be made *thread relative*.

Thread relative immutability would be trickier than global immutability, but 
hopefully still feasible.

--
nosy: +trent

___
Python tracker 

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



[issue25027] Python 3.5.0rc3 on Windows can not load more than 127 C extension modules

2015-09-09 Thread Paul Moore

Paul Moore added the comment:

> Maybe we can special-case pip uninstalling it from the site-packages folder? 
> *Paul* - any thoughts?

Sorry, I've been following this thread but it's been moving pretty fast, so I'm 
probably replying too late to be helpful now :-(

One alternative thought I had was to bundle vcruntime140.dll in a separate 
wheel, which other wheels can depend on. Then we get pip's usual dependency 
resolution to handle ensuring that the runtime is present.

It's possible to special-case vcruntime, what I'd do is modify distutils to 
omit vcruntime140.dll from the RECORD file - then nothing (pip, distlib, other 
install tools) views the vcruntime file as being "owned" by a particular 
package. I'm not overly keen on that solution, though, as it's clearly a hack 
and would be a maintainability issue going forward. But it does keep the code 
changes isolated to the core, rather than needing pip/setuptools changes.

--

___
Python tracker 

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



[issue22980] C extension naming doesn't take bitness into account

2015-09-09 Thread Larry Hastings

Larry Hastings added the comment:

Here's an attempt at a What's New section for this change.  I expect it's 
wrong!   Maybe someone can fix it.  Maybe it's actually better than not having 
one at all.

Can we maybe get a round or two of edits on this and get something in for 3.5 
final?

--
Added file: 
http://bugs.python.org/file40420/larry.whatsnew35.ext.module.suffix.diff.1.txt

___
Python tracker 

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



[issue24199] Idle: remove idlelib.idlever.py and its use in About dialog

2015-09-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 55b62e2c59f8 by Terry Jan Reedy in branch '2.7':
Issue 24199: Deprecate idlelib.idlever with a warning on import.
https://hg.python.org/cpython/rev/55b62e2c59f8

New changeset c51514826126 by Terry Jan Reedy in branch '3.4':
Issue 24199: Deprecate idlelib.idlever with a warning on import.
https://hg.python.org/cpython/rev/c51514826126

--

___
Python tracker 

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



[issue25038] test_os.TestSendfile.test_keywords() introduced a regression

2015-09-09 Thread STINNER Victor

New submission from STINNER Victor:

The change e42e2bd47168 introduced a regression, test_os started to fail on 
FreeBSD. What is the rationale of the change? For example, test_os pass in the 
previous build on the same buildbot.

I don't know if it makes sense to pass None to headers and/or trailers.

Please revert the change or fix the test. ((But we must continue to test 
headers=None and trailers=None, even if these parameters now raise a TypeError).

==
ERROR: test_keywords (test.test_os.TestSendfile)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_os.py", line 
2334, in test_keywords
headers=None, trailers=None, flags=0)
TypeError: sendfile() headers must be a sequence or None

--
messages: 250292
nosy: haypo, martin.panter
priority: normal
severity: normal
status: open
title: test_os.TestSendfile.test_keywords() introduced a regression
versions: Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue24984] document AF_BLUETOOTH socket address formats

2015-09-09 Thread Martin Panter

Changes by Martin Panter :


--
nosy: +berker.peksag

___
Python tracker 

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



[issue25034] string.Formatter accepts empty fields but displays wrong when nested

2015-09-09 Thread Anthon van der Neut

Anthon van der Neut added the comment:

The problem lies in the recursive call to _vformat which might consume fields 
without name ({}) and increment auto_arg_index, but that
incremented value was not returned to the parent.

Since the line became longer than pep8 allowed I wrapped all of the method call 
arguments to the next line, hope that that's ok.

The patch is against the mercurial repository and works for 3.4.1 upwards.

--
keywords: +patch
Added file: http://bugs.python.org/file40419/25034.patch

___
Python tracker 

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



[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-09 Thread Larry Hastings

Larry Hastings added the comment:

Given Victor's reluctance to get this in to 3.5.0, this can't even be marked as 
a "deferred blocker" anymore.  Demoting to normal priority.

--
priority: deferred blocker -> normal

___
Python tracker 

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



[issue25039] Docs: Link to Stackless Python in Design and History FAQ section is broken

2015-09-09 Thread Camilla Montonen

New submission from Camilla Montonen:

The link to Stackless Python here 
https://docs.python.org/2/faq/design.html#can-t-you-emulate-threads-in-the-interpreter-instead-of-relying-on-an-os-specific-thread-implementation
is broken. 
I get an "Internal Server Error" when trying to access it.

--
assignee: docs@python
components: Documentation
messages: 250297
nosy: Winterflower, docs@python
priority: normal
severity: normal
status: open
title: Docs: Link to Stackless Python in Design and History FAQ section is 
broken
versions: Python 2.7

___
Python tracker 

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



[issue25038] test_os.TestSendfile.test_keywords() introduced a regression

2015-09-09 Thread Martin Panter

Martin Panter added the comment:

I believe revision e42e2bd47168 is actually the cure, and test failure is 
actually caused by a new test I added in revision fdb5d84f9948. So hopefully 
things are fixed now, but I will keep an eye on the buildbots.

In fdb5d84f9948, I originally added the test_keywords() test to ensure the 
correct parameter name of “count” to sendfile().

Neither headers=None nor trailers=None were ever supported. It is just that the 
documentation and error messages which mislead me to write that test.

--

___
Python tracker 

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



[issue25027] Python 3.5.0rc3 on Windows can not load more than 127 C extension modules

2015-09-09 Thread Steve Dower

Steve Dower added the comment:

FYI: we're making a new release (right now!) with the patch applied, that 
should go out tomorrow.

If anyone spots anything important in the patch, I still really want to hear 
about it, but hopefully having something installable means we'll get at least a 
few days of testing before locking it in.

All my apologies for waiting until the last minute before giving up on the 
crusade to avoid including the versioned files in Python. The timing is 
unfortunate, but I'm sure we're going to have the best compatibility story 
possible right now. So thanks for indulging me, and I hope I haven't put too 
many people through too much anguish.

--

___
Python tracker 

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



[issue24199] Idle: remove idlelib.idlever.py and its use in About dialog

2015-09-09 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Thanks, Brett. Since I am not wrapping the warning, the default stacklevel 
seems to work on all versions.

Still to do: 1. Something in the docs (all branches), but with an eye toward 
other deprecations coming later.

2. Actually remove file in 3.6 branch, but only after ImportError does not 
crash Python when running without a console (ie, with sys.stderr == None)).  An 
future issue to fix this will be a dependency.

--
versions: +Python 3.6 -Python 2.7, Python 3.4, Python 3.5

___
Python tracker 

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



[issue24984] document AF_BLUETOOTH socket address formats

2015-09-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset da9b26670e44 by Martin Panter  in branch '3.4':
Issue #24984: Document AF_BLUETOOTH socket address formats
https://hg.python.org/cpython/rev/da9b26670e44

New changeset 4ce8450da22d by Martin Panter  in branch '3.5':
Issue #24984: Merge 3.4 into 3.5
https://hg.python.org/cpython/rev/4ce8450da22d

New changeset ec4ba0cb1ce0 by Martin Panter  in branch 'default':
Issue #24984: Merge 3.5 into 3.6
https://hg.python.org/cpython/rev/ec4ba0cb1ce0

--
nosy: +python-dev

___
Python tracker 

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



[issue24984] document AF_BLUETOOTH socket address formats

2015-09-09 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the patch, Tim. I think we can also create separate issues for 
AF_PACKET and AF_CAN and mark them as "easy".

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type:  -> enhancement

___
Python tracker 

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



[issue22980] C extension naming doesn't take bitness into account

2015-09-09 Thread Berker Peksag

Berker Peksag added the comment:

Adding Yury since he and Elvis are working on Doc/whatsnew/3.5.rst and they 
might want to take a look at the latest patch.

--
nosy: +berker.peksag, yselivanov

___
Python tracker 

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



[issue25039] Docs: Link to Stackless Python in Design and History FAQ section is broken

2015-09-09 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the report, Camilla. This could be a temporary problem with the 
Stackless website. Can you ask on 
http://www.stackless.com/mailman/listinfo/stackless?

--
nosy: +berker.peksag

___
Python tracker 

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



[issue25039] Docs: Link to Stackless Python in Design and History FAQ section is broken

2015-09-09 Thread Laura Creighton

Laura Creighton added the comment:

I do not think that asking there will help right now because the problem is 
that the whole site is down, and mailman isn't running either ...

--
nosy: +lac

___
Python tracker 

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



[issue25041] document AF_PACKET socket address format

2015-09-09 Thread Tim Tisdall

New submission from Tim Tisdall:

As mentioned in #24984, I'm making another issue to document the address format 
for AF_PACKET.  In this case there's already documentation in 
Modules/socketmodule.c that says:

- an AF_PACKET socket address is a tuple containing a string
  specifying the ethernet interface and an integer specifying
  the Ethernet protocol number to be received. For example:
  ("eth0",0x1234).  Optional 3rd,4th,5th elements in the tuple
  specify packet-type and ha-type/addr.

But nothing has been added to Doc/library/socket.rst .

The documentation needs to be confirmed with the code.  (It probably should be 
altered somewhat to state how you "specify packet-type and ha-type/addr"...  
and maybe what a "ha-type/addr" is...  A quick Google search found this very 
useful reference: 
https://books.google.ca/books?id=Chr1NDlUcI8C=PA472=OCEwyjdXJo=PuNG72WIvv4-A924f9MvzPtgQDc=en=X=0CE8Q6AEwCGoVChMI6IiTyoDqxwIVCTs-Ch3bCAXy#v=onepage=false
 )

--
assignee: docs@python
components: Documentation
messages: 250306
nosy: Tim.Tisdall, docs@python
priority: normal
severity: normal
status: open
title: document AF_PACKET socket address format
type: enhancement
versions: Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue23144] html.parser.HTMLParser: setting 'convert_charrefs = True' leads to dropped text

2015-09-09 Thread Larry Hastings

Larry Hastings added the comment:

The Misc/NEWS entry for this was added under Python 3.5.0rc3.  But, since no 
pull request has been made for this change, this change hasn't been merged into 
3.5.0.  It will ship as part of Python 3.5.1.  I've moved the Misc/NEWS entry 
accordingly.

--
nosy: +larry

___
Python tracker 

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



[issue25041] document AF_PACKET socket address format

2015-09-09 Thread Berker Peksag

Changes by Berker Peksag :


--
keywords: +easy
stage:  -> needs patch

___
Python tracker 

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



[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-09 Thread Larry Hastings

Larry Hastings added the comment:

Given Victor's reluctance to get this in to 3.5.0, this can't even be marked as 
a "deferred blocker" anymore.  Demoting to normal priority.

--
priority: deferred blocker -> normal

___
Python tracker 

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



[issue25035] Getter/setter for argparse keys

2015-09-09 Thread R. David Murray

R. David Murray added the comment:

Can you provide some specific use cases, please?

--
nosy: +r.david.murray

___
Python tracker 

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



[issue25041] document AF_PACKET socket address format

2015-09-09 Thread Tim Tisdall

Tim Tisdall added the comment:

Right now the docs say "Certain other address families (:const:`AF_PACKET`, 
:const:`AF_CAN`) support specific representations.".

I was going to create a separate issue for AF_CAN, but it seems that it's 
already documented...  When documentation is added for AF_PACKET, please remove 
the above mentioned line entirely as AF_CAN is already documented.

--

___
Python tracker 

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



[issue22980] C extension naming doesn't take bitness into account

2015-09-09 Thread Steve Dower

Steve Dower added the comment:

Only thing I'd add is that the extra tag is optional (on Windows at least), and 
Python will happily import extensions without it. But extensions with a 
mismatched tag won't be loaded.

--

___
Python tracker 

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



[issue24984] document AF_BLUETOOTH socket address formats

2015-09-09 Thread Tim Tisdall

Tim Tisdall added the comment:

I created #25041 to handle AF_PACKET.  It seems AF_CAN is already in the docs, 
so the person making the change for AF_PACKET can just remove that mention of 
AF_CAN farther down.

--

___
Python tracker 

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



[issue25041] document AF_PACKET socket address format

2015-09-09 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue25029] MemoryError in test_strptime

2015-09-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bd7aed300a1b by Steve Dower in branch '3.5':
Issue #25029: MemoryError in test_strptime
https://hg.python.org/cpython/rev/bd7aed300a1b

New changeset 706b9eaba734 by Steve Dower in branch '3.5':
Merge fix for #25029
https://hg.python.org/cpython/rev/706b9eaba734

New changeset cceaccb6ec5a by Steve Dower in branch '3.5':
Adds Mics/NEWS entry for issue #25029.
https://hg.python.org/cpython/rev/cceaccb6ec5a

--
nosy: +python-dev

___
Python tracker 

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



[issue25040] xml.sax.make_parser makes bad use of parser_list argument default value

2015-09-09 Thread Gautier Portet

New submission from Gautier Portet:

When using xml.sax.make_parser(), there is a potential problem with
the parser_list default value. 
If another module used a default value, like the problematic parser from PyXML, 
your module will also use it as default parser.

You should change this:
   def make_parser(parser_list = []):

by this :
   def make_parser(parser_list = None):

And change the following code accordingly.

BTW, I fixed by problem by simply using xml.sax.make_parser([])

--
components: XML
messages: 250303
nosy: Gautier Portet
priority: normal
severity: normal
status: open
title: xml.sax.make_parser makes bad use of parser_list argument default value
type: behavior

___
Python tracker 

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



[issue25042] Create an "embedding SDK" distribution?

2015-09-09 Thread Paul Moore

New submission from Paul Moore:

At the moment, building an application that embeds Python requires the user to 
have a full install of Python on the build machine, to get access to the 
include and library files.

Now that we provide an embeddable build of Python on Windows, would it be worth 
also having an "embedding SDK" which consisted of a zipfile distribution of the 
include and lib files?

This may be pointless, as it's not that hard to install Python onto a 
development system, and even if it is, you'd just need to grab the "include" 
and "libs" directories from an existing installation, so creating your own SDK 
is pretty trivial. It's also extra work in the release process to provide the 
extra distribution file. So I'm OK if this is viewed as not worth it.

The main advantage of having such an "SDK" would be strengthening the message 
that embedding is a well-supported scenario.

--
assignee: steve.dower
components: Windows
messages: 250310
nosy: paul.moore, steve.dower, tim.golden, zach.ware
priority: low
severity: normal
status: open
title: Create an "embedding SDK" distribution?
type: enhancement
versions: Python 3.5

___
Python tracker 

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



[issue25027] Python 3.5.0rc3 on Windows can not load more than 127 C extension modules

2015-09-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8374472c6a6e by Steve Dower in branch '3.5':
Issue #25027: Reverts partial-static build options and adds vcruntime140.dll to 
Windows installation.
https://hg.python.org/cpython/rev/8374472c6a6e

--
nosy: +python-dev

___
Python tracker 

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



[issue23447] Import fails when doing a circular import involving an `import *`

2015-09-09 Thread Brett Cannon

Changes by Brett Cannon :


--
assignee:  -> brett.cannon

___
Python tracker 

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



[issue25043] document socket constants for Bluetooth

2015-09-09 Thread Tim Tisdall

New submission from Tim Tisdall:

further to #24984, I noticed there are constants that aren't mentioned in the 
docs.  Also BDADDR_ALL is missing (which is defined in Bluez's bluetooth.h) so 
I added it.

Now, I'm not totally clear on supplying multi-version patches...  I know 3.5 is 
in "freeze" so I'm guessing adding the BDADDR_ALL constant is a no-no.  I guess 
I checkout out the different version branches, make the changes, and then 
create a patch labelled for which version it's for?  (I see the patch has the 
hash for which commit it's to be applied to, but not which branch)

The repo is down right now, so I'll include a patch once I can update my local 
copy...  :(

--
assignee: docs@python
components: Documentation, Library (Lib)
messages: 250314
nosy: Tim.Tisdall, docs@python
priority: normal
severity: normal
status: open
title: document socket constants for Bluetooth
type: enhancement
versions: Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue25044] bring BTPROTO_SCO inline with other Bluetooth protocols

2015-09-09 Thread Tim Tisdall

Changes by Tim Tisdall :


--
components: +Extension Modules

___
Python tracker 

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



[issue25045] smtplib throws exception TypeError: readline()

2015-09-09 Thread Philippe Lambotte

New submission from Philippe Lambotte:

smtplib  smtpserver.ehlo() will throw exception.
The error message : 
Traceback (most recent call last):
  File "snippet.email.sendmail.py", line 34, in 
smtpserver.ehlo()
  File "/usr/lib/python3.2/smtplib.py", line 421, in ehlo
(code, msg) = self.getreply()
  File "/usr/lib/python3.2/smtplib.py", line 367, in getreply
line = self.file.readline(_MAXLINE + 1)
TypeError: readline() takes exactly 1 positional argument (2 given)

smtplib works with python 2.7, but not  with 3.2

If I remove the passed parameter, it works in 3.2 :
 line = self.file.readline()

--
components: email
messages: 250317
nosy: barry, phlambotte, r.david.murray
priority: normal
severity: normal
status: open
title: smtplib throws exception TypeError: readline()
type: behavior
versions: Python 3.2

___
Python tracker 

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



[issue25003] os.urandom() should call getrandom(2) not getentropy(2)

2015-09-09 Thread John Beck

John Beck added the comment:

Yes, the syscall was failing with EINVAL.

--

___
Python tracker 

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



[issue25026] (FreeBSD/OSX) Fix fcntl module to accept 'unsigned long' type commands for ioctl(2).

2015-09-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The question is: are ioctl codes outside of the unsigned int range used on BSD 
family or Mac OS X?

--

___
Python tracker 

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



[issue25003] os.urandom() should call getrandom(2) not getentropy(2)

2015-09-09 Thread STINNER Victor

STINNER Victor added the comment:

> Prior to applying this patch, I had needed to tweak py_getrandom() to 
> recognize EINVAL in addition to ENOSYS as sufficient reason to turn off 
> getrandom_works.

In which case getrandom() fails with EINVAL?

--

___
Python tracker 

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



[issue25003] os.urandom() should call getrandom(2) not getentropy(2)

2015-09-09 Thread John Beck

John Beck added the comment:

@haypo: Yes, that patch works (applied to 3.5.0rc3; proxy problems are 
preventing me from updating my clone of the default branch at the moment) i.e., 
pyconfig.h shows:

#define HAVE_GETRANDOM_SYSCALL 1

To answer your other questions:
* Calling syscall(SYS_getrandom, buffer, size, 0) does work on Solaris.
* Our  does declare syscall().
* Solaris does not use the GNU C library, but our own libc, which does
  support getrandom(3) as of Solaris 11.3 (which will be released in
  the near future) and Solaris 12 (which is in Beta but has a release
  date in the more distant future).

Prior to applying this patch, I had needed to tweak py_getrandom() to recognize 
EINVAL in addition to ENOSYS as sufficient reason to turn off getrandom_works.  
I still have that tweak in place, but have not yet tried backing it out to see 
if things still behave with your patch.

Let me know if there is any more information I can provide, and thanks for your 
attention to this issue.

--

___
Python tracker 

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



[issue25044] bring BTPROTO_SCO inline with other Bluetooth protocols

2015-09-09 Thread Tim Tisdall

New submission from Tim Tisdall:

All of the BTPROTO_ protocols accept tuples with Bluetooth addresses as regular 
strings.  SCO accepts a byte-string which represents a Bluetooth address.  The 
change was made at 23ab586c427a 

With the current implementation we get this error:

>>> import socket
>>> x = socket.socket(socket.AF_BLUETOOTH, socket.SOCK_SEQPACKET, 
>>> socket.BTPROTO_SCO)
>>> x.bind(socket.BDADDR_ANY)
Traceback (most recent call last):
  File "", line 1, in 
OSError: getsockaddrarg: wrong format

This is because socket.BDADDR_ANY is a string while the bind() is expecting a 
binary string.  So the workaround would be to call 
x.bind(socket.BDADDR_ANY.encode()) .

Is it acceptable to change it to accept a regular string to match the other 
address methods and constants?  This would be essentially a breaking change, 
however on something that wasn't really documented prior to #24984 .

I'll submit a patch when the repo is back up...

--
messages: 250316
nosy: Tim.Tisdall
priority: normal
severity: normal
status: open
title: bring BTPROTO_SCO inline with other Bluetooth protocols
type: enhancement
versions: Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue25046] ImportError: No module named Multiprocessing

2015-09-09 Thread Julio

New submission from Julio:

Hi!,

I have a problem to import a multiprocessing module. I am using Python 2.7 and 
Windows 8. The program (.py) is executed since MS-DOS console.

If I run the program the output is "ImportError: No module named 
multiprocessing".

If I execute "import multiprocessing" on Python Command Line I don't have 
problems, but It isn't useful for my program, because I need to import since my 
own file .py

What do you recommend me?. I need to get benefit from the process-based 
parallelism and to use several processors. 

Thank you so much!

--
components: Library (Lib)
messages: 250318
nosy: jlmora
priority: normal
severity: normal
status: open
title: ImportError: No module named Multiprocessing
versions: Python 2.7

___
Python tracker 

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



[issue24999] Segfault in test_re.test_sre_character_class_literals() when Python is compiled by ICC

2015-09-09 Thread Stefan Krah

Stefan Krah added the comment:

Thanks, I've contacted Robert.

--

___
Python tracker 

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



[issue25042] Create an "embedding SDK" distribution?

2015-09-09 Thread Steve Dower

Steve Dower added the comment:

It may be worth it. What I'd rather have people do is to install using the 
regular installer and include both debug symbols and debug binaries. This will 
put it in a registered location that can be auto detected (I have written a 
template for Visual Studio that does just that for extensions - will be 
released soon), and also gives a pretty solid debugging experience.

Probably we just need to get word out that it's a valuable scenario and do some 
walkthroughs/tutorials (good PyCon topic?). In my paid-work life doing 
developer tools for Python developers, it's certainly something that we as 
Microsoft are willing to offer (with VS tie-ins, obviously - when you're paid 
you are also owned :) ), but I've got no opposition to supporting this.

To do an extra package, I'd need to hear that:
* people aren't able to install a full Python distro in these contexts
* people *are* able/willing to extract and configure a ZIP distro of the same 
things
* people aren't confident building against a full distro and releasing with the 
embedded distro

>From a Visual Studio POV, making a NuGet package containing the embedded 
>Python distro and the build headers would be pretty cool, simply for the IDE 
>integration. Doesn't really help other IDEs, but since they're all different I 
>think they'll all need specific solutions anyway.

--

___
Python tracker 

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



[issue22980] C extension naming doesn't take bitness into account

2015-09-09 Thread Matthias Klose

Matthias Klose added the comment:

thanks for the draft!

I'm not sure how to describe this properly. The extension names are derived 
from https://wiki.debian.org/Multiarch/Tuples

and this again is derived from the GNU triplets/quadruplets.

there is no "cpu" and "os" part, depending on the architecture some ABI parts 
are either encoded in the "cpu" part or the "os" part.

So what about just enumerating the most common cases (i386-linux-gnu, 
x86_64-linux-gnu, arm-linux-gnueabi (still used for the old Raspberry Pi), 
arm-linux-gnueabihf), and then point to the "spec"? The above examples have 
some irregular cases, most other cases just follow the triplets.

I wouldn't mention x86_64-linux-gnux32 explicitly. Until now there are only 
unreleased or experimental distros.

Not sure if it is worth mentioning that this would allow distributing "fat" 
wheels.

--

___
Python tracker 

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



[issue15347] IDLE - does not close if the debugger was active

2015-09-09 Thread Mark Roseman

Mark Roseman added the comment:

Debugger.py has a nested call to mainloop() ... which is almost always a bad 
idea. I'm betting the close is being handled in this mainloop, and there are no 
more events being generated, meaning the real mainloop towards the bottom of 
PyShell (which checks if we've got open windows) is never being reentered. 

Will try to look at this closer, but in case anyone has a chance in the 
interim...

--

___
Python tracker 

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



[issue25044] bring BTPROTO_SCO inline with other Bluetooth protocols

2015-09-09 Thread Martin Panter

Martin Panter added the comment:

Perhaps making it accept both bytes and text strings is a sensible option. 
Similar to how AF_INET can bind to both "localhost" and b"localhost".

--
nosy: +martin.panter
stage:  -> needs patch

___
Python tracker 

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



[issue25043] document socket constants for Bluetooth

2015-09-09 Thread Martin Panter

Martin Panter added the comment:

The new constant would probably have to go into 3.6 only. I suggest make two 
patches: your documentation patch to be applied to 3.4+, and the new constant, 
against 3.6 only. Also, it would be good to get a unit test for the new 
constant.

--
nosy: +martin.panter

___
Python tracker 

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



[issue24984] document AF_BLUETOOTH socket address formats

2015-09-09 Thread Martin Panter

Martin Panter added the comment:

Hello again. The patch I committed says BTPROTO_SCO accepts a bytes-like 
object. However I suspect it is actually restricted to bytes only:

>>> s = socket(AF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_SCO)
>>> s.bind(bytearray(b"12:23:34:45:56:67"))
Traceback (most recent call last):
  File "", line 1, in 
OSError: getsockaddrarg: wrong format
>>> s.bind(b"12:23:34:45:56:67")

If you can confirm this, I will update the documentation.

--
status: closed -> open

___
Python tracker 

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



[issue24965] Implement PEP 498: Literal String Formatting

2015-09-09 Thread Eric V. Smith

Changes by Eric V. Smith :


Removed file: http://bugs.python.org/file40302/pep-498.diff

___
Python tracker 

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



[issue24965] Implement PEP 498: Literal String Formatting

2015-09-09 Thread Eric V. Smith

Changes by Eric V. Smith :


Removed file: http://bugs.python.org/file40316/pep-498-1.diff

___
Python tracker 

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



[issue24965] Implement PEP 498: Literal String Formatting

2015-09-09 Thread Eric V. Smith

Changes by Eric V. Smith :


Removed file: http://bugs.python.org/file40317/pep-498-2.diff

___
Python tracker 

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



[issue24965] Implement PEP 498: Literal String Formatting

2015-09-09 Thread Eric V. Smith

Eric V. Smith added the comment:

This implements the accepted PEP 498. The only other real change I plan on 
making is to do dynamic memory allocation when building the expressions that 
make up a JoinedStr AST node. The code has all of the places to do that already 
laid out, it's just a matter of hooking it up.

There's one nit where I accept 'f' and 'F', but the PEP just says 'f'. I'm not 
sure if we should accept the upper case version. I'd think not, but all of the 
other ones (b, r, and u) do.

I need to do one more scan for memory leaks. I've rearranged some code since 
the last time I checked for leaks, and that's always a recipe for some sneaking 
in.

And I need to write some more tests, mostly for syntax errors, but also for a 
few edge conditions.

Comments welcome.

--
Added file: http://bugs.python.org/file40421/pep-498-3.diff

___
Python tracker 

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



[issue25047] xml.etree.ElementTree encoding declaration should be capital ('UTF-8') rather than lowercase ('utf-8')

2015-09-09 Thread Martin Panter

Martin Panter added the comment:

I agree that Python should not be converting the supplied encoding name to 
lowercase, although I guess reverting this has the potential to upset people’s 
output (e.g. if they depend on the checksum or something).

--
nosy: +martin.panter

___
Python tracker 

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



[issue24965] Implement PEP 498: Literal String Formatting

2015-09-09 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

On Sep 09, 2015, at 11:57 PM, Eric V. Smith wrote:

>There's one nit where I accept 'f' and 'F', but the PEP just says 'f'. I'm
>not sure if we should accept the upper case version. I'd think not, but all
>of the other ones (b, r, and u) do.

I think it should be consistent with the other prefixes.  Shouldn't be a big
deal to amend the PEP to describe this.

--

___
Python tracker 

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



[issue25035] Getter/setter for argparse keys

2015-09-09 Thread paul j3

paul j3 added the comment:

`get_default` and `set_defaults` are parser methods, and do more than set or 
get a particular Action attribute.  'Set' for example changes both the 
'parser._defaults' attribute, and a 'action.default' attribute.  Defaults are 
complex and can be defined in at least 3 different ways.

'choices' (and other things like 'required', 'nargs', even 'default') is an 
attribute of a specific Action (argument object).  You normally only set these 
in one way, as parameters of the `add_argument` method.

'action.default' and 'action.choices' are 'public' attributes.  
'parser._defaults' is a 'private' attribute.  A setter method is the right way 
to change a 'private' attribute (if needed).  It usually isn't need for a 
'public' one.

--

___
Python tracker 

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



[issue24272] PEP 484 docs

2015-09-09 Thread Larry Hastings

Larry Hastings added the comment:

Pull request accepted!  Please forward-merge, thanks!

--

___
Python tracker 

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



[issue22622] ElementTree only writes declaration when passed encoding

2015-09-09 Thread Martin Panter

Martin Panter added the comment:

As far as I can tell this was already working, even in 3.4.0a1 (the first 
pre-release of 3.4):

>>> tree.write('/dev/stdout', xml_declaration=True)



But it is not working in Python 2:

>>> tree.write('/dev/stdout', xml_declaration=True)


Looking at the history, I am confused because a 3.2.3 revision (df8609f1854d) 
comes up in the history of 2.7’s /Doc/library/xml.etree.elementtree.rst. 
Perhaps it is just that the documentation has inherited some wording from 
Python 3. Possibly also relevant: revision 57e631f 
 and Issue 8047.

--
nosy: +martin.panter
stage:  -> needs patch
versions: +Python 2.7 -Python 3.4

___
Python tracker 

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



[issue25035] Getter/setter for argparse keys

2015-09-09 Thread Sworddragon

Sworddragon added the comment:

I'm actually not fully sure why you are telling me this all, especially in this 
specific way.

But I would also go the other way, by removing ArgumentParser.get_default and 
ArgumentParser.set_defaults if we think the current ways of getting/setting are 
enough. Mainly I think consistence is the important here.

--

___
Python tracker 

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



[issue24272] PEP 484 docs

2015-09-09 Thread Guido van Rossum

Guido van Rossum added the comment:

Merged and pushed. Let's please use a new issue for any further patches.

--
status: open -> closed

___
Python tracker 

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



[issue22464] Speed up fractions implementation

2015-09-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6c8e2c6e3a99 by Yury Selivanov in branch '3.5':
whatsnew/3.5: Mention issue 22464
https://hg.python.org/cpython/rev/6c8e2c6e3a99

--

___
Python tracker 

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



[issue25035] Getter/setter for argparse keys

2015-09-09 Thread paul j3

paul j3 added the comment:

`parser.set_defaults` lets you set a default for any `dest`.  It does not have 
to be connected with an argument.  See what the docs say about using it to set 
an action linked to a subparser.

`arg1 = parser.add_argument(...)` returns an `Action` object.  The parser 
collects these objects in its lists, but you can also save a reference to it 
yourself.

I'd suggest doing this in an interactive shell, and see for yourself the 
attributes of this object.  Simply doing a 'print' on the object shows a number 
of the attributes (but not all).  It is possible to view, and in some cases, 
even modify these attributes directly.

`args.choices` gives you access to the `choices` attribute.

I don't think there's a need for getter/setter methods for Action attributes.  
The attributes are accessible by normal Python object approaches.

p.s. Another forum for asking argparse how-to questions is Stackoverflow.  Just 
tag it 'argparse'.

--
nosy: +paul.j3

___
Python tracker 

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



[issue25026] (FreeBSD/OSX) Fix fcntl module to accept 'unsigned long' type commands for ioctl(2).

2015-09-09 Thread koobs

koobs added the comment:

@Serhiy If anyone can provide me some test code (I dont know how to test it) 
I'm happy to test it on 'unpatched' 2.7 and 3.5 ports

--

___
Python tracker 

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



[issue24272] PEP 484 docs

2015-09-09 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

Thank you, Guido!

I have noticed single quotes in line 38: 

type hinted using `Callable[[Arg1Type, Arg2Type], ReturnType]`

I think it would be logical to replace it with double quotes: 

``Callable[[Arg1Type, Arg2Type], ReturnType]`` 

as Zachary did in the rest of the text.

By the way, you have marked my patch as Daniels and vice versa in the commit 
descriptions, but that probably does not matter :)

--

___
Python tracker 

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



[issue24272] PEP 484 docs

2015-09-09 Thread Guido van Rossum

Guido van Rossum added the comment:

I apologize for the mix-up! The code review tool didn't help.

Regarding the single quotes, there seem to be a bunch more of these, and as 
cutting a PR is a fair bit of labor I'd rather not fix that. We can fix this 
once 3.5.0 it out of the door (hopefully this weekend).

--

___
Python tracker 

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



[issue24857] mock: Crash on comparing call_args with long strings

2015-09-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 83ea55a1204a by Berker Peksag in branch '3.4':
Issue #24857: Comparing call_args to a long sequence now correctly returns a
https://hg.python.org/cpython/rev/83ea55a1204a

New changeset df91c1879e56 by Berker Peksag in branch '3.5':
Issue #24857: Comparing call_args to a long sequence now correctly returns a
https://hg.python.org/cpython/rev/df91c1879e56

New changeset 6853b4bc0b22 by Berker Peksag in branch 'default':
Issue #24857: Comparing call_args to a long sequence now correctly returns a
https://hg.python.org/cpython/rev/6853b4bc0b22

--
nosy: +python-dev

___
Python tracker 

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



[issue24857] mock: Crash on comparing call_args with long strings

2015-09-09 Thread Berker Peksag

Berker Peksag added the comment:

Thanks!

For the record, the __ne__ issue created by A Kaptur is issue 24997.

--
nosy: +berker.peksag
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue25045] smtplib throws exception TypeError: readline()

2015-09-09 Thread R. David Murray

R. David Murray added the comment:

Can you explain how to reproduce the problem? That code is working fine in the 
unit tests, and the file object returned by socket.makefile has a readline 
method that accepts a size argument, so I'm guessing there is something odd 
going on with your code.

--

___
Python tracker 

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



[issue25040] xml.sax.make_parser makes bad use of parser_list argument default value

2015-09-09 Thread R. David Murray

R. David Murray added the comment:

Can you explain how this manifests?  make_parser neither mutates the list nor 
returns it, so I don't see how this is a bug.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue25045] smtplib throws exception TypeError: readline()

2015-09-09 Thread Philippe Lambotte

Philippe Lambotte added the comment:

The code is :

#!/usr/bin/env python3
#-*- coding: utf-8 -*-

import smtplib, os
from email.mime.multipart import MIMEMultipart
from email.mime.base import MIMEBase
from email.mime.text import MIMEText
from email.utils import COMMASPACE, formatdate
from email import encoders

EMAIL_FROM = 'emailf...@mywebsite.net'
EMAIL_TO = ['emai...@mywebsite.net']

SENDER_LOGIN = 'mylogin'
SENDER_PASSWORD = 'mypassword'
SMTP_HOST = 'smtp.myhoster.net'
SMTP_PORT = 587
SMTP_IS_STARTTLS = True
SUBJECT ="This is the subject"
TEXT = 'This is a test'
FILES = list() # ['dummy_text.txt']


def send_mail_with_attachment( send_from, send_to, subject, text, files=[], 
server="localhost", port=587, username='', password='', isTls=True):
msg = MIMEMultipart()
msg['From'] = send_from
msg['To'] = COMMASPACE.join(send_to)
msg['Date'] = formatdate(localtime = True)
msg['Subject'] = subject

msg.attach( MIMEText(text) )
if len(files) > 0 :
for f in files:
part = MIMEBase('application', "octet-stream")
part.set_payload( open(f,"rb").read() )
encoders.encode_base64(part)
part.add_header('Content-Disposition', 'attachment; 
filename="{0}"'.format(os.path.basename(f)))
msg.attach(part)

smtp = smtplib.SMTP(server, port)
if isTls: smtp.starttls()
smtp.login(username,password)
smtp.sendmail(send_from, send_to, msg.as_string())
smtp.quit()

send_mail_with_attachment(EMAIL_FROM,EMAIL_TO,SUBJECT,TEXT,FILES,SMTP_HOST,SMTP_PORT,SENDER_LOGIN,SENDER_PASSWORD,SMTP_IS_STARTTLS)



When I run it, I have the following message :

Traceback (most recent call last):
  File "snippet.email.envoyer_un_mail_au_format_html.py", line 46, in 

send_mail_with_attachment(EMAIL_FROM,EMAIL_TO,SUBJECT,TEXT,FILES,SMTP_HOST,SMTP_PORT,SENDER_LOGIN,SENDER_PASSWORD,SMTP_IS_STARTTLS)
  File "snippet.email.envoyer_un_mail_au_format_html.py", line 42, in 
send_mail_with_attachment
smtp.login(username,password)
  File "/usr/lib/python3.2/smtplib.py", line 595, in login
self.ehlo_or_helo_if_needed()
  File "/usr/lib/python3.2/smtplib.py", line 554, in ehlo_or_helo_if_needed
if not (200 <= self.ehlo()[0] <= 299):
  File "/usr/lib/python3.2/smtplib.py", line 421, in ehlo
(code, msg) = self.getreply()
  File "/usr/lib/python3.2/smtplib.py", line 367, in getreply
line = self.file.readline(_MAXLINE + 1)
TypeError: readline() takes exactly 1 positional argument (2 given)

--

___
Python tracker 

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



[issue25046] ImportError: No module named Multiprocessing

2015-09-09 Thread R. David Murray

R. David Murray added the comment:

I suggest posting your question to the python-list mailing list, you are much 
more likely to get help there.  This tracker is for bugs in python, and what 
you describe sounds like a problem with your program and/or your setup (if 
'import multiprocessing' works at the command line, it should work in a program 
if run by the same python interpreter as you used at the command line).

--
nosy: +r.david.murray
resolution:  -> works for me
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue24272] PEP 484 docs

2015-09-09 Thread Guido van Rossum

Guido van Rossum added the comment:

Pull Request: 
https://bitbucket.org/larry/cpython350/pull-requests/24/docs-update-for-typing-module/diff

--

___
Python tracker 

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



[issue25035] Getter/setter for argparse keys

2015-09-09 Thread Sworddragon

Sworddragon added the comment:

I was myself in the case where I needed the values of the choices key of 2 
specific arguments. Currently I'm solving this by storing them in variables but 
probably it could be cleaner by using a getter.

--

___
Python tracker 

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



[issue25047] xml.etree.ElementTree encoding declaration should be capital ('UTF-8') rather than lowercase ('utf-8')

2015-09-09 Thread Simeon Warner

New submission from Simeon Warner:

Seems that in python3 the XML encoding declaration from xml.etree.ElementTree 
has changed from 2.x in that it is now lowercased, e.g. 'utf-8'. While the XML 
spec [1] says that decoders _SHOULD_ understand this, the encoding string 
_SHOULD_ be 'UTF-8'. It seems that keeping to the standard in the vein of being 
strictly conformant in encoding, lax in decoding will give maximum 
compatibility.

It also seems like an unhelpful change for 2.x to 3.x migration though that is 
perhaps a minor issue (but how I noticed it).

Can show with:

>cat a.py
from xml.etree.ElementTree import ElementTree, Element
import os, sys
print(sys.version_info)
if sys.version_info > (3, 0):
fp = os.fdopen(sys.stdout.fileno(), 'wb')
else:
fp = sys.stdout
root = Element('hello',{'beer':'good'})
ElementTree(root).write(fp, encoding='UTF-8', xml_declaration=True)
fp.write(b"\n")

>python a.py
sys.version_info(major=2, minor=7, micro=5, releaselevel='final', serial=0)



>python3 a.py
sys.version_info(major=3, minor=4, micro=2, releaselevel='final', serial=0)



Cheers,
Simeon

[1]  "In an encoding 
declaration, the values "UTF-8", "UTF-16", ... should be used for the various 
encodings and transformations of Unicode" and then later "XML processors should 
match character encoding names in a case-insensitive way".

--
components: XML
messages: 250328
nosy: zimeon
priority: normal
severity: normal
status: open
title: xml.etree.ElementTree encoding declaration should be capital ('UTF-8') 
rather than lowercase ('utf-8')
type: behavior
versions: Python 3.4

___
Python tracker 

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



[issue25048] %e Directive Missing in Datetime Documentation

2015-09-09 Thread Marc Bouvier

New submission from Marc Bouvier:

The %e directive is missing in the Datetime documentation. I have tried this 
directive in 2.6.6, 2.7.2, and 2.7.10 using 
datetime.datetime.strftime(datetime.datetime.now(), '%A, %B %e, %Y') and it 
works in all cases.

The below documentation line is pulled from, 
http://linux.die.net/man/3/strftime. The behavior is the same.

%e

Like %d, the day of the month as a decimal number, but a leading zero is 
replaced by a space. (SU)

--
assignee: docs@python
components: Documentation
messages: 250335
nosy: docs@python, marcrbouvier
priority: normal
severity: normal
status: open
title: %e Directive Missing in Datetime Documentation
type: enhancement
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue25048] %e Directive Missing in Datetime Documentation

2015-09-09 Thread Marc Bouvier

Marc Bouvier added the comment:

Sorry, the documentation page I am looking at is 
https://docs.python.org/2/library/datetime.html#strftime-and-strptime-behavior 
and 
https://docs.python.org/3/library/datetime.html#strftime-and-strptime-behavior.

--

___
Python tracker 

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



[issue25048] %e Directive Missing in Datetime Documentation

2015-09-09 Thread R. David Murray

Changes by R. David Murray :


--
stage:  -> resolved

___
Python tracker 

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



[issue25048] %e Directive Missing in Datetime Documentation

2015-09-09 Thread R. David Murray

R. David Murray added the comment:

strftime passes the string through to the OS, which sometimes supports more 
format codes than the ones documented as working on all platforms.  There is a 
note in the docs about this.

--
nosy: +r.david.murray
resolution:  -> not a bug
status: open -> closed

___
Python tracker 

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