[issue24844] Python 3.5rc1 compilation error with Apple clang 4.2 included with Xcode 4

2015-08-11 Thread Larry Hastings

Larry Hastings added the comment:

I'd need to see the patch to be certain, but yes my assumption is I'd accept a 
pull request for this.

--

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



[issue9232] Allow trailing comma in any function argument list.

2015-08-11 Thread Larry Hastings

Larry Hastings added the comment:

With PEP 448, we can now have

fronkulate(**kwargs, **kwargs2)

--

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



[issue24844] Python 3.5rc1 compilation error with Apple clang 4.2 included with Xcode 4

2015-08-11 Thread Ned Deily

Ned Deily added the comment:

This is a regression from previous releases of Python.  It was introduced by 
fbe87fb071a6 (for Issue22038) which added the use of C built-in functions for 
atomic memory access for additional architectures like x86_64.  It seems that 
the relatively early version of Apple's clang included with Xcode 4 fails 
compiling this code.  The specific clang version that failed (Apple LLVM 
version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)) is the version included 
with the last shipped version of Xcode 4, Xcode 4.6.3, for OS X 10.7 and 10.8.  
For OS X 10.8, there is available a more recent version of Xcode, Xcode 5.1.1, 
which includes a new version of clang, Apple LLVM 5.1 (clang-503.0.40), which 
does correctly compile this code.  In general, we always recommend using the 
most recent available version of Xcode- or Command Line Tools-installed build 
tools for a particular version of OS X (with the notable exception of OS X 10.6 
- stick with Xcode 3.2.6 there).  So upgrading to Xcode 5.1.1 on 
 OS X 10.8.5 should solve the problem there.  Unfortunately, for OS X 10.7.x, 
Xcode 4.6.3 is the most recent version and Xcode 4 has always been somewhat 
problematic for Python builds.  It was in Xcode 4 that Apple stopped shipping 
the native gcc-4.2 compiler in favor of clang and the hybrid Apple 
llvm-gcc-4.2 compiler (which uses gcc as the front end and LLVM as the 
backend).  The llvm-gcc-4.2 compiler was a transitional tool, not 
well-maintained, and is known to incorrectly compile recent versions of Python 
3 (Issue13241) so it cannot be used as a substitute for clang in this case on 
OS X 10.7 (it was no longer shipped as of Xcode 5).

Support for OS X 10.8 is much more important than OS X 10.7: I doubt there are 
*that* many users are still on 10.7.  So I think a case could be made for 
marking this as won't fix.  On the other hand, it should be possible to add 
tests to ./configure to skip trying to use the atomic builtins when this 
compiler is in use.

--
nosy: +haypo, larry
title: Python 3.5rc1 compilation error on OS X 10.8 - Python 3.5rc1 
compilation error with Apple clang 4.2 included with Xcode 4

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



Re: pyjs - a compiler from Python to JavaScript

2015-08-11 Thread Chris Angelico
On Wed, Aug 12, 2015 at 5:08 AM, Fabio Zadrozny fabi...@gmail.com wrote:

 As it's just a way to convert from a Python-like syntax to JavaScript syntax 
 you can even switch to plain JavaScript later on if you want -- in fact, when 
 you debug the code you'll be debugging JavaScript and not Python (it's like 
 CoffeScript but with a Python-like syntax).


So, it functions with ECMAScript semantics everywhere? This is an
important consideration. A Python integer is not the same as an
ECMAScript number (which is a float), and a Python string is not the
same as an ECMAScript string, and a Python dictionary has attributes
and keys which don't collide.

I'm more than a little tickled by the PyPyJS project:

http://pypyjs.org/

That's PyPy running in your web browser. The semantics are 100%
Python, but... uhh, it does require a fairly hefty download of code
before it can do anything. That _is_ a bit of a downside, but it's
still a pretty cool project!

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue24847] Can't import tkinter in Python 3.5.0rc1

2015-08-11 Thread Matthew Barnett

New submission from Matthew Barnett:

I'm unable to import tkinter in Python 3.5.0rc1.

The console says:

C:\Python35python
Python 3.5.0rc1 (v3.5.0rc1:1a58b1227501, Aug 10 2015, 05:18:45) [MSC v.1900 64 
bit (AMD64)] on win32
Type help, copyright, credits or license for more information.
 import tkinter
Traceback (most recent call last):
   File stdin, line 1, in module
   File C:\Python35\lib\tkinter\__init__.py, line 35, in module
 import _tkinter # If this fails your Python may not be configured for Tk
ImportError: DLL load failed: The specified module could not be found.


I'm on Windows 10 Home (64-bit).

--
components: IDLE
messages: 248437
nosy: mrabarnett, steve.dower
priority: normal
severity: normal
status: open
title: Can't import tkinter in Python 3.5.0rc1
type: behavior
versions: Python 3.5

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



[issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates

2015-08-11 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

There are two causes:

1. UTF-16 and UTF-32 are based on 2- and 4-bytes units. If the surrogateescape 
error handler will support UTF-16 and UTF-32, encoding could produce the data 
that can't be decoded back correctly. For example '\udcac \udcac' - 
b'\xac\x20\x00\xac' - '\u20ac\uac20' == '€가'.

2. ASCII bytes (0x00-0x80) can't be escaped with surrogateescape. UTF-16 and 
UTF-32 data can contain illegal ASCII bytes (b'\xD8\x00' in UTF-16-BE, b'abcd' 
in UTF-32). For the same reason surrogateescape is not compatible with UTF-7 
and CP037.

--

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



[issue24843] 2to3 not working

2015-08-11 Thread gladman

gladman added the comment:

I have now got it working using the command line:

C:\Program Files\Python35\Tools\scriptsC:\Program Files\Python34\python 
2to3.py --help

I am not sure why the default Windows invocation of Python doesn't work with 
2to3 as this works fine with other python scripts that I have tried.

--

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



Re: Pipes

2015-08-11 Thread Laura Creighton
In a message of Mon, 10 Aug 2015 15:43:26 -0500, E.D.G. writes:
   I needed a program that could generate data regarding the locations 
of the sun and the moon in the sky in response to specific times entered. 
Roger developed the basic equations with some help from another researcher. 
And that took a while.  But it probably took a full six months for us to 
compare notes by E-mail and get the program into a final form that people 
could download for free use.

I see a pattern here.  You and Roger keep coming up with cool ideas,
but neglect to check if _somebody else already had them_ and if we
already have a Python package that does what you want to do.

We've got, for instance, PyEphem http://rhodesmill.org/pyephem/tutorial.html
and if that doesn't already do what you want, well there are other choices
that astronomers are using all the time, right now.  Wrapping a giu around
PyEphem, if that is what you want is a job that can be measured in
hours or days if you are a proficient Python programmer.

   That is just too much time.  Researchers need to be able to do things 
such as create simple charts etc. without spending months or years learning 
some programming language or comparing notes with one another.  So, an 
entire Python directory that made that possible and that had clear 
instructions for how to open and close files and create pipes etc. would 
get the job done.

We've already got this with the Scientific Python distribution.
For more than 20 years, thousands, tens of thousands of scientist-python
programmers have been beavering away writing solutions to the problems
you mention and others that are, as you say, deeply important to them.
I am sorry that you came to this party late, but the good news is that
you should be able to get what you want with a whole lot less work than
you think.

What you need to do is familiarise yourself with what we already
got, instead of assuming that because you don't know about them, they
don't exist.  One of the ways to do this is to join scientific python
mailing lists.  **This list isn't one of them.**  Scientists who use
Python mostly _do not hang out here_.

I'd join Scipy-Users: http://www.scipy.org/scipylib/mailing-lists.html
or hang out on the freenode irc channel #scipy and tell the people
both places that you are new to python and are looking for an overview
of what there is out there.  Maybe post the same thing to the Anaconda
Google group.
https://groups.google.com/a/continuum.io/forum/?fromgroups#!forum/anaconda

The scientists in all of these places are going to give you better
answers for how to familiarise yourself with their ecosystem than I
can -- they _live_ there, and I just vist sometimes.


   If Roger wants to use Python then we might use the ActiveState 
version and then build those various resources into it.  It reportedly 
installs in a Windows environment without problems.  And I myself have used 
the ActiveState versions of Perl for quite a few years with a considerable 
amount of success.

If you want to write more tutorials about how to use the various Python
resources we already have, then more power to you, we always need more
of that.  But if you plan on redoing stuff we already have a way to do,
then you are likely to be ignored.

The usual thing to do is to join some existing Python project, and
contribute your ideas and code to it.  So, since you are interested in
graphics you might join the matplotlib group.  Or you might join the
bokeh group.  It's not impossible to start your own project -- the
bokeh people did, after all, but this pretty much only works if you
address a real problem that isn't being met by the existing libraries.
For instance, the bokeh people wanted to make an interactive
visualisation library that targets modern web browsers.  It sounds
like you are interested in that as well, but the bokeh people are way,
way, way ahead of you in that business.  There are more of them, and
they have been writing code to improve how they do things every day
now since 2012 (at least that what their license says).  So you aren't
going to catch them with your new project.  If it turns out they are
unable to do something that you need, the thing to do is to join the
project and help them by implementing that stuff so it can be added to
the library.

   This assumes that the ActiveState version of Python can be taught to 
do fast calculations and to generate charts.  If that does not look possible 
or easy then we will probably try one of the available scientific versions 
of Python.

You are misunderstanding something here.  You don't need to teach
ActiveState Python to do fast calculations and generate
charts. Somebody already has done this, in a variety of ways, some of
which have worked for more than a decade, I think more than 15 years
now.  And that is where numpy comes in -- this is one of the ways to
teach Python to do faster calculations.  So is Cython.  So is Numba.
The reason you would go for a 

[issue24842] Mention SimpleNamespace in namedtuple docs

2015-08-11 Thread Raymond Hettinger

Raymond Hettinger added the comment:

The NT docs are already very long and I don't think an additional crossref is 
beneficial (NTs are closer to tuples and SNs are closer to dicts).   Also, the 
uptake for SNs are nearly zero.

--

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



Re: Is Django the way to go for a newbie?

2015-08-11 Thread Laura Creighton
In a message of Tue, 11 Aug 2015 09:49:01 +0800, Dwight GoldWinde writes:
Thank you, Gary, for this new information.

I will be looking into virtualenv and vertualenvwrapper.

I thought that Django was an IDE. But, it seems that an IDE is one more
thing that I need that I didn¹t know I needed!?


BIG SMILE...

Always, Dwight

An IDE is a convenience, and some people swear by them and couldn't
live without them.  An enormous number of people do without, though
and just use an editor (one that is designed for code, naturally,
such as emacs or VIM and not, OpenOffice or Notepad) instead.

Laura
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Sorry folks, minor hiccup for Python 3.5.0rc1

2015-08-11 Thread Larry Hastings

On 08/10/2015 05:55 PM, Larry Hastings wrote:
I yanked the tarballs off the release page as soon as I suspected 
something.  I'm rebuilding the tarballs and the docs now.  If you 
grabbed the tarball as soon as it appeared, it's slightly out of date, 
please re-grab.


p.s. I should have mentioned--the Mac and Windows builds should be 
fine.  They, unlike me, updated their tree ;-)

--
https://mail.python.org/mailman/listinfo/python-announce-list

   Support the Python Software Foundation:
   http://www.python.org/psf/donations/


Sorry folks, minor hiccup for Python 3.5.0rc1

2015-08-11 Thread Larry Hastings



I built the source tarballs with a slightly-out-of-date tree.  We 
slipped the release by a day to get two fixes in, but the tree I built 
from didn't have those two fixes.


I yanked the tarballs off the release page as soon as I suspected 
something.  I'm rebuilding the tarballs and the docs now.  If you 
grabbed the tarball as soon as it appeared, it's slightly out of date, 
please re-grab.


Sorry for the palaver,


//arry/
--
https://mail.python.org/mailman/listinfo/python-announce-list

   Support the Python Software Foundation:
   http://www.python.org/psf/donations/


[issue24842] Mention SimpleNamespace in namedtuple docs

2015-08-11 Thread Stefan Behnel

Stefan Behnel added the comment:

 Also, the uptake for SNs are nearly zero.

That suggests to me that pointing users to it could help. It's currently hidden 
in the types module and if I didn't know it existed, I could end up looking in 
collections, and failing to find it there, write my own.

--
nosy: +scoder

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



ANN: Eliot 0.8, the logging system with causality

2015-08-11 Thread Itamar Turner-Trauring
Most logging systems can tell you what happened; Eliot tells you *why* it
happened:

$ python linkcheck.py | eliot-tree
4c42a789-76f5-4f0b-b154-3dd0e3041445
+-- check_links@1/started
`-- urls: [u'http://google.com', u'http://nosuchurl']
+-- download@2,1/started
`-- url: http://google.com
+-- download@2,2/succeeded
+-- download@3,1/started
`-- url: http://nosuchurl
+-- download@3,2/failed
|-- exception: requests.exceptions.ConnectionError
|-- reason: ('Conn aborted', gaierror(-2, 'Name unknown'))
+-- check_links@4/failed
|-- exception: exceptions.ValueError
|-- reason: ('Conn aborted.', gaierror(-2, 'Name unknown'))

And here's the code that generated these logs (eliot-tree
https://warehouse.python.org/project/eliot-tree/ was used to render the
output):

import sys
from eliot import start_action, to_file
import requests
to_file(sys.stdout)

def check_links(urls):
with start_action(action_type=check_links, urls=urls):
for url in urls:
try:
with start_action(action_type=download, url=url):
response = requests.get(url)
response.raise_for_status()
except Exception as e:
raise ValueError(str(e))

check_links([http://google.com;], [http://nosuchurl;])


Interested? Read more at https://eliot.readthedocs.org/.

Eliot is released under the Apache License 2 by ClusterHQ
https://clusterhq.com, the Container Data People. We're hiring!
https://clusterhq.com/careers/
-- 
https://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


[RELEASED] Python 3.5.0rc1 is now available

2015-08-11 Thread Larry Hastings



On behalf of the Python development community and the Python 3.5 release 
team, I'm relieved to announce the availability of Python 3.5.0rc1, also 
known as Python 3.5.0 Release Candidate 1.


Python 3.5 has now entered feature freeze.  By default new features 
may no longer be added to Python 3.5.


This is a preview release, and its use is not recommended for production 
settings.



You can find Python 3.5.0rc1 here:

https://www.python.org/downloads/release/python-350rc1/

Windows and Mac users: please read the important platform-specific 
Notes on this release section near the end of that page.



Happy hacking,


/arry

--
https://mail.python.org/mailman/listinfo/python-announce-list

   Support the Python Software Foundation:
   http://www.python.org/psf/donations/


[issue24843] 2to3 not working

2015-08-11 Thread gladman

New submission from gladman:

when I try to use the 2to3 script on the command line on Windows x64, I get the 
response:

  C:\Program Files\Python34\Tools\scripts2to3 
C:\Users\brian\Downloads\puzzles.py
  At least one file or directory argument required.
  Use --help to show usage.

When I ask for help I get:

  C:\Program Files\Python34\Tools\scripts2to3 --help
  At least one file or directory argument required.
  Use --help to show usage.

In fact this is always the response I obtain irrespective of what I enter after 
'2to3' on the command line.  Python 3.5rc1 also behaves in the same way.

--
components: 2to3 (2.x to 3.x conversion tool)
messages: 248396
nosy: gladman
priority: normal
severity: normal
status: open
title: 2to3 not working
type: behavior
versions: Python 3.4

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



[issue24840] implement bool conversion for enums to prevent odd edge case

2015-08-11 Thread Mike Lundy

Mike Lundy added the comment:

@serhiy.storchaka: It's somewhat of a special case, to be sure. However, I do 
think it's justified to put it into the base (rather than a user type) for 
three reasons:

1) It makes IntEnum and Enum consistent. IntEnum actually already handles this 
case just fine, because it's an int and therefore already supports __bool__ 
correctly. It feels odd that changing the storage format from an IntEnum to a 
Enum should break the logic- correctly used, the actual enum values should 
never matter. This small change just brings them into line.

2) It is less surprising than the current case; I discovered this when I did 
something like the Enum.Nope case here, and I naively used the enum in an if 
statement, assuming that the value would control the __bool__ value. (This was 
caught by my tests, of course, but the point remains that I wrote the code). 
Normally in python, you'd expect the default bool conversion to be 
unconditionally True, but enums aren't really normal objects; for any use case 
for which there is a default noop value, you'd generally put that value _into_ 
the enum:

class FilterType(Enum):
NONE = None
SUB  = 'Sub'
UP   = 'Up'
...

3) It's not logically inconsistent with the idea of Enums. The other dunder 
methods you mention aren't consistent with the concept: __float__ (enum values 
aren't generally numbers except as an implementation detail), __lt__ (enums 
aren't generally ordered), __len__ (enums aren't generally containers). The one 
thing an enum does have is a value, and it feels consistent to me to check the 
truthiness of an enum without having to reach into the .value to do so.

Anyway, that's my case for inclusion!

--

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



Flan definition collision

2015-08-11 Thread smahabole--- via Python-list
I am importing two modules, each of which is defining flags (command line 
arguments) with the same name. This makes it impossible to import both the 
modules at once, because of flag name definition conflict. Is there any way 
which doesn't involve modifying the flag names in these modules?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Pipes

2015-08-11 Thread Laura Creighton
The O'Reilly book Effective Computation in Physics that Larry Hudson
recommended looks really good.  It also occurs to me that another way
to get familiar with the scientific python world is to attend a
Scientific Python conference.  EuroSciPy is the end of this month in
Cambridge. https://www.euroscipy.org/2015/

The US conference for 2015 was in July, so you missed it, but there
will be one next year.  I just don't know when.
There is one in India in December. http://scipy.in/2015
The next Latin America conference is in Brazil in May 2016.

I may have missed some conferences.

Good luck,
Laura


-- 
https://mail.python.org/mailman/listinfo/python-list


[issue9232] Allow trailing comma in any function argument list.

2015-08-11 Thread Adam Bartoš

Adam Bartoš added the comment:

Some remarks:

• A trailing comma after a non-empty argument list is allowed in every call 
form, including class statement and optional call in decorator syntax. In the 
grammar, this correponds to `arglist`.

• In function definition, trailing comma is allowed only if there is no star 
before:
def f(a, b, c,): # allowed
def f(a=1, b=2, c=3,): # allowed
def f(*args,): # disallowed
def f(**kwargs,): # disallowed
def f(*, a, b, c,): # disallowed
The last example is what bothers me. The presence of the star should not affect 
whether trailing comma is allowed or not. If `f(a, b, c,)` is allowed as a 
call, it should be allowed in a definition, and if def `f(a, b, c,)` is 
allowed, `f(*, a, b, c,)` should be allowed as well.

In the grammar this corresponds to `typedargslist` for functions and 
`varargslist` for lambdas.

• A traling comma is allowed in tuples, lists, dicts, sets, the corresponding 
comprehensions, augmented assignments, and subscripts. It is also allowed in 
`from module import names` in the names part, but only if there are surrounding 
parentheses. Also a trailing semicolon is allowed for multiple statements in 
one line.

• A traling comma is *not* allowed in with statement, `import modules`, assert 
statement (there is just optional second argument), global and nonlocal 
statements. In all these cases surrounding parentheses are not allowed.

--

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



Re: Data integrity problem with sqlite3

2015-08-11 Thread Frank Millman
Chris Angelico  wrote in message 
news:CAPTjJmrHmj2bsdSm4CQ=orgxutmyctk3w3e3n-qxolg2tvq...@mail.gmail.com...


On Tue, Aug 11, 2015 at 9:33 PM, Frank Millman fr...@chagford.com wrote:
 I have added 'set_trace_callback' to see exactly what is going on, and 
 in

 the middle of my series of commands I find the following -

COMMIT
BEGIN IMMEDIATE

 According to the docs, the sqlite3 module commits transactions 
 implicitly

 before a non-DML, non-query statement (i. e. anything other than
 SELECT/INSERT/UPDATE/DELETE/REPLACE).

 In my traceback I can only see SELECTs and UPDATEs following the 
 implicit
 commit, so I do not know what is triggering it. I am trying to reproduce 
 the
 problem in a simpler example, but so far without success. My running 
 program
 has two connections to the database open, another connection to an 
 in-memory
 database, and it is all running under asyncio, so it is quite difficult 
 to

 mimic all of this.

 I will persevere, but in the meantime, does anyone happen to know under 
 what

 other circumstances sqlite3 might issue an implicit commit?


Not sure if it'll actually *solve* your problem, but it might help you
to find out more about what's going on... Try switching to PostgreSQL.
Among the key differences are (a) transactional DDL, which means you
won't get those implicit commits, and (b) server-side logging, so you
might get a different window into what your code is doing.

Personally, I use Postgres as much as possible, but in your situation,
it might be better for you to continue using sqlite3 in production.
But for the purposes of debugging, it should be worth a try.



My PostgreSQL is inaccessible at the moment as I am moving machines around, 
but I have tested it with MS SQL Server, and it behaves as expected – the 
transaction is fully rolled back and nothing is committed to the database.


BTW, I am not using sqlite3 ‘in production’. Rather, I offer a choice of 3 
databases to my users – PostgreSQL, SQL Server, and sqlite3, so I have to 
make sure that my program works with all of them.


Frank


--
https://mail.python.org/mailman/listinfo/python-list


[issue24843] 2to3 not working

2015-08-11 Thread Steve Dower

Steve Dower added the comment:

If this occurs in 3.5 then it needs to be fixed (though I thought I'd already 
fixed it once...).

I'll take a look.

--
assignee:  - steve.dower
status: closed - open
versions: +Python 3.5, Python 3.6 -Python 3.4

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



Re: Flan definition collision

2015-08-11 Thread Joel Goldstick
On Tue, Aug 11, 2015 at 2:28 AM, smahabole--- via Python-list
python-list@python.org wrote:
 I am importing two modules, each of which is defining flags (command line 
 arguments) with the same name. This makes it impossible to import both the 
 modules at once, because of flag name definition conflict. Is there any way 
 which doesn't involve modifying the flag names in these modules?

Please show relevant code.

  import a
  import b

will not cause a collision as a variable called v would be identified as

  a.v or b.v depending on where it is defined



-- 
Joel Goldstick
http://joelgoldstick.com
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue24843] 2to3 not working

2015-08-11 Thread gladman

gladman added the comment:

Thanks for the explanation. My apologies for this posting, which I will now 
close

--
status: open - closed

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



[issue24769] Interpreter doesn't start when dynamic loading is disabled

2015-08-11 Thread Larry Hastings

Larry Hastings added the comment:

Uh, Nick?  You didn't add me to this bug.

--
nosy: +larry

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



Re: Data integrity problem with sqlite3

2015-08-11 Thread Chris Angelico
On Tue, Aug 11, 2015 at 9:33 PM, Frank Millman fr...@chagford.com wrote:
 I have added 'set_trace_callback' to see exactly what is going on, and in
 the middle of my series of commands I find the following -

COMMIT
BEGIN IMMEDIATE

 According to the docs, the sqlite3 module commits transactions implicitly
 before a non-DML, non-query statement (i. e. anything other than
 SELECT/INSERT/UPDATE/DELETE/REPLACE).

 In my traceback I can only see SELECTs and UPDATEs following the implicit
 commit, so I do not know what is triggering it. I am trying to reproduce the
 problem in a simpler example, but so far without success. My running program
 has two connections to the database open, another connection to an in-memory
 database, and it is all running under asyncio, so it is quite difficult to
 mimic all of this.

 I will persevere, but in the meantime, does anyone happen to know under what
 other circumstances sqlite3 might issue an implicit commit?


Not sure if it'll actually *solve* your problem, but it might help you
to find out more about what's going on... Try switching to PostgreSQL.
Among the key differences are (a) transactional DDL, which means you
won't get those implicit commits, and (b) server-side logging, so you
might get a different window into what your code is doing.

Personally, I use Postgres as much as possible, but in your situation,
it might be better for you to continue using sqlite3 in production.
But for the purposes of debugging, it should be worth a try.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: looking for standard/builtin dict-like data object

2015-08-11 Thread Chris Angelico
On Tue, Aug 11, 2015 at 10:06 PM, Vladimir Ignatov kmis...@gmail.com wrote:
 I also thought the stdlib had some kind of namespace class with this
 kind
 of API, but I can't find it now:-(


 It does - types.SimpleNamespace(). It accepts keyword arguments, and
 will let you create more attributes on the fly (unlike a namedtuple).


 Yes, that's it. Thanks!


 Ah, sad, sad, sad.  We unfortunately stuck with built-in Python 2.6.x
 in our system.  I see from docs that SimpleNamespace is rather new
 creation (3.3+).  I know 'namedtuple' way, but don't like it as I
 prefer freedom in attribute creation/mutation.  Looks like I have to
 stuck with handmade solution for now.


In that case, what I would recommend is: Use your handmade solution,
but call it SimpleNamespace, and make it entirely compatible with the
Python 3.3 one. Then, when you do get a chance to upgrade, all you
need to do is change your import statement, and you're using the
standard library one. Plus, it's going to be easy for anyone else to
read - they'll already know what SimpleNamespace does and what to
expect of it, so they don't have to dig around to see what your class
is doing.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates

2015-08-11 Thread tmp12342

tmp12342 added the comment:

Serhiy, I understand the first reason, but 
https://docs.python.org/3/library/codecs.html says
 applicable to text encodings:
 [...]
 This code will then be turned back into the same byte when the 
 'surrogateescape' error handler is used when encoding the data.
Shouldn't it be corrected? Text encoding is defined as A codec which encodes 
Unicode strings to bytes.


And about second one, could you explain a bit more? I mean, I don't know how to 
interpret it.

You say b'\xD8\x00' are invalid ASCII bytes, but from these two only 0xD8 is 
invalid. Also, we are talking about encoding here, str - bytes, so who cares 
are resulting bytes ASCII compatible or not?

--
nosy: +tmp12342

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



Re: Flan definition collision

2015-08-11 Thread Luca Menegotto

Il 11/08/2015 08:28, smahab...@google.com ha scritto:

I am importing two modules, each of which is defining flags

 (command line arguments) with the same name. This makes
 it impossible to import both the modules at once, because of flag
 name definition conflict.




If you use 'import', and not 'from xyz import', you avoid any conflict.

Ah: 'from ... import' has caused me a lot of terrible headaches. I don't 
use this statement if not strictly necessary.


--
Bye.
Luca

--
https://mail.python.org/mailman/listinfo/python-list


ANN python-taiga 0.5.0

2015-08-11 Thread Andrea Stagi
Python-taiga 0.5.0 released!

python-taiga is a python module for communicating with Taiga.io, a new
project management platform! For more info https://taiga.io/

This release includes minfixes and API importer support.

You can find python-taiga code on Github https://github.com/nephila/python-
taiga

Any kind of contribution is appreciated! :)

-- 
Andrea Stagi (@4stagi) - Develover @Nephila
Job profile: http://linkedin.com/in/andreastagi
Website: http://4spills.blogspot.it/
Github: http://github.com/astagi
-- 
https://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


Re: looking for standard/builtin dict-like data object

2015-08-11 Thread Vladimir Ignatov
 I also thought the stdlib had some kind of namespace class with this
 kind
 of API, but I can't find it now:-(


 It does - types.SimpleNamespace(). It accepts keyword arguments, and
 will let you create more attributes on the fly (unlike a namedtuple).


 Yes, that's it. Thanks!


Ah, sad, sad, sad.  We unfortunately stuck with built-in Python 2.6.x
in our system.  I see from docs that SimpleNamespace is rather new
creation (3.3+).  I know 'namedtuple' way, but don't like it as I
prefer freedom in attribute creation/mutation.  Looks like I have to
stuck with handmade solution for now.

Anyway - thanks a lot for everybody!


Vladimir
https://itunes.apple.com/us/app/python-code-samples/id1025613117
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Data integrity problem with sqlite3

2015-08-11 Thread Chris Angelico
On Tue, Aug 11, 2015 at 10:37 PM, Frank Millman fr...@chagford.com wrote:
 My PostgreSQL is inaccessible at the moment as I am moving machines around,
 but I have tested it with MS SQL Server, and it behaves as expected – the
 transaction is fully rolled back and nothing is committed to the database.

Does MS SQL offer any hints in its logs? Can you enable full statement
logging, and then grep it for anything that doesn't begin INSERT or
UPDATE or SELECT?

 BTW, I am not using sqlite3 ‘in production’. Rather, I offer a choice of 3
 databases to my users – PostgreSQL, SQL Server, and sqlite3, so I have to
 make sure that my program works with all of them.

Ah. Comes to the same thing, anyway; if you can't get enough info out
of one backend, verify it with the others.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Data integrity problem with sqlite3 - solved

2015-08-11 Thread Frank Millman

Frank Millman  wrote in message news:mqcmie$po9$1...@ger.gmane.org...


Hi all

I have a 'data integrity' problem with sqlite3 that I have been battling 
with for a while. I have not got to the bottom of it yet but I do have 
some useful info, so I thought I would post it here in the hope that 
someone with some knowledge of the internals of the python sqlite3 module 
can throw some light on it.


Oops, I have just spotted my mistake.

There are times when I want to issue a SELECT statement with a lock, as it 
will be followed by an UPDATE and I do not want anything to change in 
between.


MS SQL Server allows you to add 'WITH (UPDLOCK)' to a SELECT statement, 
PostgreSQL allows you to add 'FOR UPDATE'.


I could not find an equivalent for sqlite3, but in my wisdom (this was some 
time ago) I decided that issuing a 'BEGIN IMMEDIATE' would do the trick.


I had not anticipated that this would generate an implied COMMIT first, but 
it makes sense, and this is what has bitten me. Now I must try to figure out 
a better solution.


Apologies for any wasted time.

Frank






--
https://mail.python.org/mailman/listinfo/python-list


Re: Pipes

2015-08-11 Thread Tim Golden

On 11/08/2015 10:58, Laura Creighton wrote:

The O'Reilly book Effective Computation in Physics that Larry Hudson
recommended looks really good.  It also occurs to me that another way
to get familiar with the scientific python world is to attend a
Scientific Python conference.  EuroSciPy is the end of this month in
Cambridge. https://www.euroscipy.org/2015/

The US conference for 2015 was in July, so you missed it, but there
will be one next year.  I just don't know when.
There is one in India in December. http://scipy.in/2015
The next Latin America conference is in Brazil in May 2016.

I may have missed some conferences.


This September's PyConUK has a science track:

http://www.pyconuk.org/science/

TJG
--
https://mail.python.org/mailman/listinfo/python-list


[issue24843] 2to3 not working

2015-08-11 Thread eryksun

eryksun added the comment:

Your .py file association isn't configured to pass command-line arguments. 
Revert to using the Python.File type that was created by Python's installer. 
The associated command should be something like 

C:\Windows\py.exe %1 %*

depending on where py.exe is located.

--
components: +Windows -2to3 (2.x to 3.x conversion tool)
nosy: +eryksun, paul.moore, steve.dower, tim.golden, zach.ware

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



[issue24839] platform._syscmd_ver raises DeprecationWarning

2015-08-11 Thread Larry Hastings

Larry Hastings added the comment:

They are currently in sync, yes.  The 3.5 branch has been a ghost town the last 
day or two, which tbh has been pleasant for me.helpfu

--

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



[issue24839] platform._syscmd_ver raises DeprecationWarning

2015-08-11 Thread Larry Hastings

Larry Hastings added the comment:

Merged.  Please forward-port to 3.5.1 and 3.6.  Thanks!

(See?  Already I can tell this rc-cycle is going to be way easier on me than 
3.4 was.)

--

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



Data integrity problem with sqlite3

2015-08-11 Thread Frank Millman

Hi all

I have a 'data integrity' problem with sqlite3 that I have been battling 
with for a while. I have not got to the bottom of it yet but I do have some 
useful info, so I thought I would post it here in the hope that someone with 
some knowledge of the internals of the python sqlite3 module can throw some 
light on it.


I am running python 3.4.3 on Windows 7, and I have upgraded sqlite from the 
original '3.7.something' to '3.8.6'. I do not change the isolation level 
from the default setting.


I have a transaction with a number of steps. One of the later steps raises 
an exception, and I execute a rollback. However, some of the earlier steps 
are committed to the database. Obviously this is a major problem.


I have added 'set_trace_callback' to see exactly what is going on, and in 
the middle of my series of commands I find the following -


   COMMIT
   BEGIN IMMEDIATE

According to the docs, the sqlite3 module commits transactions implicitly 
before a non-DML, non-query statement (i. e. anything other than 
SELECT/INSERT/UPDATE/DELETE/REPLACE).


In my traceback I can only see SELECTs and UPDATEs following the implicit 
commit, so I do not know what is triggering it. I am trying to reproduce the 
problem in a simpler example, but so far without success. My running program 
has two connections to the database open, another connection to an in-memory 
database, and it is all running under asyncio, so it is quite difficult to 
mimic all of this.


I will persevere, but in the meantime, does anyone happen to know under what 
other circumstances sqlite3 might issue an implicit commit?


Thanks

Frank Millman


--
https://mail.python.org/mailman/listinfo/python-list


Re: pyjs - a compiler from Python to JavaScript

2015-08-11 Thread Uri Even-Chen
Thanks for the feedback. Actually I asked this question also in the
django-users mailing list and Russell Keith-Magee told me about
Brython, Skulpt and PyPy.js (I hope it's OK that I reply to these 3 mailing
lists) but I also asked if I can use JavaScript scripts such as jQuery,
jQuery UI and other jQuery plugins from the scripts in Python and Russell
said it's possible but not practical for production. And I'm thinking about
developing Speedy Mail Software or other projects for production (of course
after the alpha  beta are over) so I guess we are stuck with JavaScript
for the client side programming. And I don't mind if they use a compiler or
an interpreter or any other method to run Python in the client side, as
long as it works. But without using jQuery and other plugins it would be
very hard to use these projects in production.

Uri.

*Uri Even-Chen*   [image: photo] Phone: +972-54-3995700
Email: u...@speedy.net
Website: http://www.speedysoftware.com/uri/en/
http://www.facebook.com/urievenchen  http://plus.google.com/+urievenchen
  http://www.linkedin.com/in/urievenchen  http://twitter.com/urievenchen
 Speedypedia in Hebrew and English
http://www.speedysoftware.com/uri/blog/speedypedia-in-hebrew-and-english/

On Mon, Aug 10, 2015 at 7:40 PM, Ian Kelly ian.g.ke...@gmail.com wrote:

 On Fri, Aug 7, 2015 at 5:00 AM, Uri Even-Chen u...@speedy.net wrote:
 
  Are you familiar with pyjs? I saw the website and I see that the latest
 stable release is from May 2012. Is it possible to use pyjs to compile
 Python to JavaScript? Which versions of Python are supported? Are versions
 2.7 and 3.4 supported? And is it possible to use Django (in the client
 side) and JavaScript frameworks such as jQuery, jQuery UI and jQuery
 plugins together with pyjs?

 And if you check the commit history on GitHub, there are only two
 commits in the past year. The project was hijacked (i.e. forked plus
 we're taking the domain name and the mailing list too) a few years
 ago (also in May 2012, I think not coincidentally), and that sadly
 seems to have slowly killed the development momentum on the project.

 I'm not really familiar with the space, but I tend to hear good things
 about Brython. PyPy.js and Skulpt are other alternatives. However, I
 think that all of these are implementations of Python in Javascript,
 not Python to Javascript compilers.
 --
 https://mail.python.org/mailman/listinfo/python-list

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue24840] implement bool conversion for enums to prevent odd edge case

2015-08-11 Thread R. David Murray

R. David Murray added the comment:

I agree that it seems odd that testing a 'value' that is false for its truth 
value would return True.  It is surprising, even if it is an edge case.

--

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



[issue21167] float('nan') returns 0.0 on Python compiled with icc

2015-08-11 Thread R. David Murray

R. David Murray added the comment:

Note that Chris' patch is coming from Intel.  (The ICC buildbots are currently 
building with -fp-model strict, by the way.)

Mark, Stefan, what do you think?  Is this a good idea?  IIUC we would then not 
have to worry about differentiating between the python build and the distutils 
flags, and users would get whatever they specified at python build time.

--
nosy: +r.david.murray

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



[issue24843] 2to3 not working

2015-08-11 Thread gladman

gladman added the comment:

Hi Steve,

The behaviour I reported was the same on Python 3.4 and 3.5rc1.  But eryksun 
was correct in suggesting that this was a problem in the way my file 
association for Python was set up. My py_auto_file association was set to: 

C:\Program Files\Python34\python.exe %1

adding %* on the end fixed the problem.
 
(by the way, thank you for your work on _msvccompiler.py).

   best regards,

 Brian

--

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



[issue21167] float('nan') returns 0.0 on Python compiled with icc

2015-08-11 Thread Chris Hogan

Chris Hogan added the comment:

Producing NaN by Py_HUGE_VAL / Py_HUGE_VAL as in the suggested patch is unsafe 
as it can generate a FP exception during runtime. Also aggresive compiler FP 
optimizations can eliminate this calculation on compile-time. For this reason, 
we've used constant referencing in our fix, which will work regardless of how 
-fp-model is set.

The problem is that the compiler is free to pre-compute the result as both 
values in 0*Inf are constants. An aggressively optimizing compiler could treat 
0 * x = 0 no matter what x is. So under aggressive floating point optimizations 
setting we could get a wrong value, and that is indeed what happens. 

Another problem is that 0 * Inf along with resulting in a QNaN value should 
raise an invalid floating point exception flag. If the result is pre-computed 
at compile time, then the user won’t see the flag (it is another question 
whether the user wanted the flag or not originally).

Our patch preserves both the value and the side effect, and leaves people free 
to build with the flags they want.

--
nosy: +christopher.hogan
Added file: http://bugs.python.org/file40162/intel-nan-safe.patch

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



[issue24842] Mention SimpleNamespace in namedtuple docs

2015-08-11 Thread R. David Murray

R. David Murray added the comment:

I use SimpleNamespace in just about every project I'm currently working on.  I 
would *not* say that their uptake is nearly zero :)

And yes, I wouldn't be aware of it if I hadn't been following python-dev when 
it was introduced, and had (before it was introduced) written my own variations 
numerous times.

--
nosy: +r.david.murray

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



EuroPython 2015: Videos are online

2015-08-11 Thread M.-A. Lemburg
Thanks to our Media Work Group (WG) and especially Anthon and Luis,
the conference videos are now cut, edited and uploaded to our YouTube
channel as well as our archive.org collection:

http://europython.tv
http://archive.europython.tv

A total of 173 talk videos were processed, so there’s a lot of
interesting content to watch. The talk videos are also embedded into
the talk pages referenced in our session list for easy navigation:

https://ep2015.europython.eu/en/events/sessions/

Two short examples from the popular lightning talks sessions:

  * Storing acorns
https://www.youtube.com/watch?v=WmvTfUYJ2Bwfeature=youtu.bet=48m25s

  * The -ish library
https://www.youtube.com/watch?v=LQSWi3QJV8st=59m28s

These are some short links for easy access:

  * http://europython.tv - for our YouTube channel
  * http://ep2015.europython.tv - for the EuroPython 2015 playlist
  * http://archive.europython.tv - for our archive.org collection

Enjoy,
--
EuroPython 2015 Team
http://ep2015.europython.eu/
http://www.europython-society.org/
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue9232] Allow trailing comma in any function argument list.

2015-08-11 Thread Guido van Rossum

Guido van Rossum added the comment:

I'm +1 on adding this. I don't believe it requires a PEP. A trailing comma in 
definitions is already supported in some places, so I don't buy the argument 
that it catches errors. During the moratorium we were perhaps too strict.

--
nosy: +gvanrossum

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



[issue24798] _msvccompiler.py doesn't properly support manifests

2015-08-11 Thread R. David Murray

R. David Murray added the comment:

Please open a new issue, referencing this one.  Priority should be set to 
release blocker.  (I forget if regular users can do that; if you can't I will.)

--
nosy: +r.david.murray

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



[issue24798] _msvccompiler.py doesn't properly support manifests

2015-08-11 Thread Christoph Gohlke

Christoph Gohlke added the comment:

This change broke all my builds that link statically against 3rd party 
libraries built with the `/MD` flag. `/MD` was used at least since Python 2.3 
and is the default for static libraries in Visual Studio 2015. Some of the 
broken builds: lxml, pillow, matplotlib, pygame, pycuda, pymssql, netcdf4, 
GDAL, psycopg2, pycurl, gmpy, and pyopenssl. All of these packages built OK 
with Python 3.5.0b4.

The build errors are of this kind: 
`error LNK2001: unresolved external symbol __imp_memchr`
`error LNK2001: unresolved external symbol __imp_strstr`

The linker throws the following warning:
`LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; 
use /NODEFAULTLIB:library`

--
nosy: +cgohlke

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



[issue24844] Python 3.5rc1 compilation error on OS X 10.8

2015-08-11 Thread Yury Selivanov

Changes by Yury Selivanov yseliva...@gmail.com:


--
nosy: +benjamin.peterson, ned.deily, yselivanov
priority: normal - release blocker

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



[issue24843] 2to3 not working

2015-08-11 Thread eryksun

Changes by eryksun eryk...@gmail.com:


--
resolution:  - not a bug
status: open - closed

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



[issue24640] no ensurepip in embedded Windows distribution

2015-08-11 Thread Steve Dower

Steve Dower added the comment:

Updated the documentation and it should be in 3.5.0rc1's docs on using with 
Windows.

--
resolution:  - fixed
stage:  - resolved
status: open - closed

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



[issue24844] Python 3.5rc1 compilation error on OS X 10.8

2015-08-11 Thread David Beazley

New submission from David Beazley:

Just a note that Python-3.5.0rc1 fails to compile on Mac OS X 10.8.5 with the 
following compiler:

bash$ clang --version
Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin12.6.0
Thread model: posix
bash$ 

Here is the resulting compilation error:

/usr/bin/clang -c -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG 
-g -fwrapv -O3 -Wall -Wstrict-prototypes-Werror=declaration-after-statement 
  -I. -IInclude -I./Include-DPy_BUILD_CORE -o Python/ceval.o Python/ceval.c
fatal error: error in backend: Cannot select: 0x102725710: i8,ch =
  AtomicSwap 0x102c45ce0, 0x102725010, 0x102725510Volatile
  ST1[@gil_drop_request.0.b] [ID=7]
  0x102725010: i64 = X86ISD::WrapperRIP 0x102723710 [ID=6]
0x102723710: i64 = TargetGlobalAddressi1* @gil_drop_request.0.b 0 [ID=4]
  0x102725510: i8 = Constant1 [ID=2]
In function: take_gil
make: *** [Python/ceval.o] Error 1

Problem can be fixed by commenting out the following line in pyconfig.h

/* Has builtin atomics */
// #define HAVE_BUILTIN_ATOMIC 1   


Not really sure what to advise.  To my eyes, it looks like a bug in clang or 
Xcode.  So, maybe this is more just an FYI that source builds might fail on 
certain older Mac systems.

--
messages: 248415
nosy: dabeaz
priority: normal
severity: normal
status: open
title: Python 3.5rc1 compilation error on OS X 10.8
type: compile error
versions: Python 3.5

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



[issue24843] 2to3 not working

2015-08-11 Thread Steve Dower

Steve Dower added the comment:

Yes, I see. Thanks for clarifying, it seems all the installers are fine but 
Windows will generate associations that don't forward arguments.

--
assignee: steve.dower - 
resolution:  - not a bug
status: open - closed
versions:  -Python 3.5, Python 3.6

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



Re: pyjs - a compiler from Python to JavaScript

2015-08-11 Thread Fabio Zadrozny
On Tue, Aug 11, 2015 at 8:55 AM, Uri Even-Chen u...@speedy.net wrote:

 Thanks for the feedback. Actually I asked this question also in the
 django-users mailing list and Russell Keith-Magee told me about
 Brython, Skulpt and PyPy.js (I hope it's OK that I reply to these 3 mailing
 lists) but I also asked if I can use JavaScript scripts such as jQuery,
 jQuery UI and other jQuery plugins from the scripts in Python and Russell
 said it's possible but not practical for production. And I'm thinking about
 developing Speedy Mail Software or other projects for production (of course
 after the alpha  beta are over) so I guess we are stuck with JavaScript
 for the client side programming. And I don't mind if they use a compiler or
 an interpreter or any other method to run Python in the client side, as
 long as it works. But without using jQuery and other plugins it would be
 very hard to use these projects in production.

 Uri.



​I think that you could try RapydScript: http://rapydscript.pyjeon.com/

Cheers,

Fabio
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue24385] libpython27.a in python-2.7.10 i386 (windows msi release) contains 64-bit objects

2015-08-11 Thread Steve Dower

Steve Dower added the comment:

Doesn't seem to be anything left to do here, so closing as fixed.

--
resolution:  - fixed
stage:  - resolved
status: open - closed

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



[issue24843] 2to3 not working

2015-08-11 Thread Steve Dower

Steve Dower added the comment:

I'm afraid there's no easy way to revert it. I may get to invest the time for 
3.6's launcher[1] to make it available in Default Programs, but I've always 
struggled to get that to work properly.

Explorer should always use the per-user command if it's there, and it's 
basically the responsibility of users to not change it if they don't want it to 
change.

[1] The launcher owns the shortcut, not the core Python installation - the 
separation is only important to users in that if you don't include the launcher 
you don't get the association, and if you install the launcher for all users 
then the shortcut is for all users.

(Also cleared the Versions field, since Python 3.4 creates the correct 
association too. Preventing user customization on a user's machine is not 
something we're going to get into, but that's the only way to solve this 
problem.)

--
versions:  -Python 3.4

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



[issue23626] Windows per-user install of 3.5a2 doesn't associate .py files with the new launcher

2015-08-11 Thread Steve Dower

Steve Dower added the comment:

I haven't seen this at all, so until we see a repro of it, I'm closing.

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

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



[issue20362] longMessage attribute is ignored in unittest.TestCase.assertRegexpMatches etc

2015-08-11 Thread Ilia Kurenkov

Ilia Kurenkov added the comment:

Bump :)

Let's close this one, guys!

--

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



[issue24760] IDLE settings dialog shouldn't be modal

2015-08-11 Thread Mark Roseman

Mark Roseman added the comment:

The attached demodalize.patch (which includes the changes from the previously 
posted decouple_config.patch) changes both the settings dialog and the about 
dialog to be non-modal.

There's a new class UIFactory which is responsible for launching these kinds of 
windows, keeping track of them, and making sure there's only one of each kind 
at a time. This is also where the logic for choosing ttk vs. non-ttk components 
will go.

As a (questionable) bonus, the about dialog, which now incorporates the 
README's etc directly into the window rather than launching further modal 
dialogs, also has some other minor cosmetic changes.

--
versions:  -Python 3.4
Added file: http://bugs.python.org/file40163/demodalize.patch

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



testfixtures 4.2.0 Released!

2015-08-11 Thread Chris Withers

Hi All,

I'm pleased to announce the release of testfixtures 4.2.0. This is a 
feature release that fixes the following:


- A new MockPopen mock for use when testing code that uses
  subprocess.Popen.

- ShouldRaiss now subclasses object, so that subclasses of it
  may use super().

- Support for Python 3.2 has been officially dropped.

Thanks to BATS Global Markets for donating the code for MockPopen.

The package is on PyPI and a full list of all the links to docs, issue 
trackers and the like can be found here:


http://www.simplistix.co.uk/software/python/testfixtures

Any questions, please do ask on the Testing in Python list or on the 
Simplistix open source mailing list...


cheers,

Chris

--
Simplistix - Content Management, Batch Processing  Python Consulting
   - http://www.simplistix.co.uk
--
https://mail.python.org/mailman/listinfo/python-list


[issue24843] 2to3 not working

2015-08-11 Thread eryksun

eryksun added the comment:

 My py_auto_file association

Oh, it's that auto filetype again. Steve, when you say you fixed this for 3.5, 
does that means there's a simple command or API to revert this automatic ProgId 
back to the Python.File type? This problem shows up repeatedly on Stack 
Overflow, so it would be nice to have a solution that works consistently from 
Windows 7 to 10. 

cmd.exe's built-in assoc and ftype commands only modify the local machine 
association and filetype. A per-user install doesn't use those, and sometimes 
Explorer instead uses a per-executable command defined in 
Software\Classes\Applications. Also, just modifying the command doesn't 
actually select what ShellExecuteEx will choose to run. I used to directly 
modify Explorer's FileExts\...\UserChoice for a given file extension, but 
that's actively discouraged by a deny ACL nowadays. Fine, but I've run into 
cases where Explorer's dialog doesn't let me choose a an existing ProgId.

--
assignee:  - steve.dower
resolution: not a bug - 
status: closed - open
versions: +Python 3.5, Python 3.6

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



[issue24843] 2to3 not working

2015-08-11 Thread eryksun

Changes by eryksun eryk...@gmail.com:


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

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



Re: pyjs - a compiler from Python to JavaScript

2015-08-11 Thread Fabio Zadrozny
Hi Uri,

No, I'm not related to it. -- I'm the PyDev/Eclipse maintainer... that
already takes a lot of my time ;)

It's license is BSD (so, no need to pay). As it's just a way to convert
from a Python-like syntax to JavaScript syntax you can even switch to plain
JavaScript later on if you want -- in fact, when you debug the code you'll
be debugging JavaScript and not Python (it's like CoffeScript but with a
Python-like syntax).

Cheers,

Fabio

On Tue, Aug 11, 2015 at 3:48 PM, Uri Even-Chen u...@speedy.net wrote:

 Thanks Fabio, it's very interesting. Are you related to Pyjeon Software?
 Do we have to pay to use RapydScript? Is it ready for production?


 *Uri Even-Chen*   [image: photo] Phone: +972-54-3995700
 Email: u...@speedy.net
 Website: http://www.speedysoftware.com/uri/en/
 http://www.facebook.com/urievenchen
 http://plus.google.com/+urievenchen
 http://www.linkedin.com/in/urievenchen  http://twitter.com/urievenchen
  Speedypedia in Hebrew and English
 http://www.speedysoftware.com/uri/blog/speedypedia-in-hebrew-and-english/

 On Tue, Aug 11, 2015 at 8:54 PM, Fabio Zadrozny fabi...@gmail.com wrote:


 On Tue, Aug 11, 2015 at 8:55 AM, Uri Even-Chen u...@speedy.net wrote:

 Thanks for the feedback. Actually I asked this question also in the
 django-users mailing list and Russell Keith-Magee told me about
 Brython, Skulpt and PyPy.js (I hope it's OK that I reply to these 3 mailing
 lists) but I also asked if I can use JavaScript scripts such as jQuery,
 jQuery UI and other jQuery plugins from the scripts in Python and Russell
 said it's possible but not practical for production. And I'm thinking about
 developing Speedy Mail Software or other projects for production (of course
 after the alpha  beta are over) so I guess we are stuck with JavaScript
 for the client side programming. And I don't mind if they use a compiler or
 an interpreter or any other method to run Python in the client side, as
 long as it works. But without using jQuery and other plugins it would be
 very hard to use these projects in production.

 Uri.



 ​I think that you could try RapydScript: http://rapydscript.pyjeon.com/

 Cheers,

 Fabio



-- 
https://mail.python.org/mailman/listinfo/python-list


Re: pyjs - a compiler from Python to JavaScript

2015-08-11 Thread Uri Even-Chen
Thanks Fabio, it's very interesting. Are you related to Pyjeon Software? Do
we have to pay to use RapydScript? Is it ready for production?


*Uri Even-Chen*   [image: photo] Phone: +972-54-3995700
Email: u...@speedy.net
Website: http://www.speedysoftware.com/uri/en/
http://www.facebook.com/urievenchen  http://plus.google.com/+urievenchen
  http://www.linkedin.com/in/urievenchen  http://twitter.com/urievenchen
 Speedypedia in Hebrew and English
http://www.speedysoftware.com/uri/blog/speedypedia-in-hebrew-and-english/

On Tue, Aug 11, 2015 at 8:54 PM, Fabio Zadrozny fabi...@gmail.com wrote:


 On Tue, Aug 11, 2015 at 8:55 AM, Uri Even-Chen u...@speedy.net wrote:

 Thanks for the feedback. Actually I asked this question also in the
 django-users mailing list and Russell Keith-Magee told me about
 Brython, Skulpt and PyPy.js (I hope it's OK that I reply to these 3 mailing
 lists) but I also asked if I can use JavaScript scripts such as jQuery,
 jQuery UI and other jQuery plugins from the scripts in Python and Russell
 said it's possible but not practical for production. And I'm thinking about
 developing Speedy Mail Software or other projects for production (of course
 after the alpha  beta are over) so I guess we are stuck with JavaScript
 for the client side programming. And I don't mind if they use a compiler or
 an interpreter or any other method to run Python in the client side, as
 long as it works. But without using jQuery and other plugins it would be
 very hard to use these projects in production.

 Uri.



 ​I think that you could try RapydScript: http://rapydscript.pyjeon.com/

 Cheers,

 Fabio


-- 
https://mail.python.org/mailman/listinfo/python-list


[issue21167] float('nan') returns 0.0 on Python compiled with icc

2015-08-11 Thread Mark Dickinson

Mark Dickinson added the comment:

Looks fine to me.  IIRC, we moved the PyFloat_FromString implementation away 
from using Py_NAN in Python 3 for exactly this reason.

On this point, though:

 An aggressively optimizing compiler could treat 0 * x = 0 no matter what x is.

Wouldn't such a compiler be in violation of the C standard, at least if it 
defines __STDC_IEC_559__?

--

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



[issue23968] rename the platform directory from plat-$(MACHDEP) to plat-$(PLATFORM_TRIPLET)

2015-08-11 Thread William Scullin

William Scullin added the comment:

This would likely improve life for folks with cross-compile toolchains.

--
nosy: +wscullin

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



Re: pyjs - a compiler from Python to JavaScript

2015-08-11 Thread Uri Even-Chen
Thanks Fabio, we'll check RapydScript and we might use it for Speedy Mail
Software as well! I will check with the other developers (which are on
the speedy-mail-software list). In the past I had Speedy Mail online from
2000 to 2005 and it was based on a Perl script (Perl was popular in 2000).
But since it didn't support Unicode/UTF-8 encoding and didn't have a spam
filter I decided to close it in 2005 (after Google introduced Gmail). But I
think today it's easier to create software than it was in 2005, and I hope
next year we can launch Speedy Mail again, based on the Speedy Mail
Software we are developing (which will be free software  open source). I'm
looking forward to launching Speedy Mail as an alternative to Gmail.


*Uri Even-Chen*   [image: photo] Phone: +972-54-3995700
Email: u...@speedy.net
Website: http://www.speedysoftware.com/uri/en/
http://www.facebook.com/urievenchen  http://plus.google.com/+urievenchen
  http://www.linkedin.com/in/urievenchen  http://twitter.com/urievenchen
 Speedypedia in Hebrew and English
http://www.speedysoftware.com/uri/blog/speedypedia-in-hebrew-and-english/

On Tue, Aug 11, 2015 at 10:08 PM, Fabio Zadrozny fabi...@gmail.com wrote:

 Hi Uri,

 No, I'm not related to it. -- I'm the PyDev/Eclipse maintainer... that
 already takes a lot of my time ;)

 It's license is BSD (so, no need to pay). As it's just a way to convert
 from a Python-like syntax to JavaScript syntax you can even switch to plain
 JavaScript later on if you want -- in fact, when you debug the code you'll
 be debugging JavaScript and not Python (it's like CoffeScript but with a
 Python-like syntax).

 Cheers,

 Fabio

 On Tue, Aug 11, 2015 at 3:48 PM, Uri Even-Chen u...@speedy.net wrote:

 Thanks Fabio, it's very interesting. Are you related to Pyjeon Software?
 Do we have to pay to use RapydScript? Is it ready for production?


 *Uri Even-Chen*   [image: photo] Phone: +972-54-3995700
 Email: u...@speedy.net
 Website: http://www.speedysoftware.com/uri/en/
 http://www.facebook.com/urievenchen
 http://plus.google.com/+urievenchen
 http://www.linkedin.com/in/urievenchen
 http://twitter.com/urievenchen
  Speedypedia in Hebrew and English
 http://www.speedysoftware.com/uri/blog/speedypedia-in-hebrew-and-english/

 On Tue, Aug 11, 2015 at 8:54 PM, Fabio Zadrozny fabi...@gmail.com
 wrote:


 On Tue, Aug 11, 2015 at 8:55 AM, Uri Even-Chen u...@speedy.net wrote:

 Thanks for the feedback. Actually I asked this question also in the
 django-users mailing list and Russell Keith-Magee told me about
 Brython, Skulpt and PyPy.js (I hope it's OK that I reply to these 3 mailing
 lists) but I also asked if I can use JavaScript scripts such as jQuery,
 jQuery UI and other jQuery plugins from the scripts in Python and Russell
 said it's possible but not practical for production. And I'm thinking about
 developing Speedy Mail Software or other projects for production (of course
 after the alpha  beta are over) so I guess we are stuck with JavaScript
 for the client side programming. And I don't mind if they use a compiler or
 an interpreter or any other method to run Python in the client side, as
 long as it works. But without using jQuery and other plugins it would be
 very hard to use these projects in production.

 Uri.



 ​I think that you could try RapydScript: http://rapydscript.pyjeon.com/

 Cheers,

 Fabio




-- 
https://mail.python.org/mailman/listinfo/python-list


[issue9232] Allow trailing comma in any function argument list.

2015-08-11 Thread Robert Collins

Robert Collins added the comment:

The patch had some conflicts in the reference docs, I think I resolved it 
correctly: if someone wanted to cross check my work that would be great. 
However I was feeling (perhaps wrongly :)) confident so I have committed it 
as-is.

--
resolution:  - fixed
stage: commit review - resolved
status: open - closed

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



[issue9232] Allow trailing comma in any function argument list.

2015-08-11 Thread Adam Bartoš

Adam Bartoš added the comment:

Do we want to allow a trailing comma after *args or **kwargs in a function 
definition? Unlike in a call, **kwargs is always the last thing in the list and 
nothing can be added after that. Just asking.

--

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



[issue24845] IDLE functional/integration testing

2015-08-11 Thread Mark Roseman

Mark Roseman added the comment:

I've attached functionaltests.patch which provides a starting point, using Tk 
introspection and event generation to exercise the running application. The 
heart of it is the (very much in progress) TkTestCase class which provides a 
bunch of Tkinter-specific utilities to be used for tests.

One thing I'm not sure about is that because these run somewhat slower than the 
existing unit tests, should they be shut off by default if someone is running a 
repository-wide test?

--
Added file: http://bugs.python.org/file40165/functionaltests.patch

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



[issue9232] Allow trailing comma in any function argument list.

2015-08-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 419ceb531bab by Robert Collins in branch 'default':
Issue #9232: Support trailing commas in function declarations.
https://hg.python.org/cpython/rev/419ceb531bab

--
nosy: +python-dev

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



[issue24845] IDLE functional/integration testing

2015-08-11 Thread Mark Roseman

New submission from Mark Roseman:

This is a placeholder issue for adding automated functional/integration tests 
to complement the existing unit tests.

--
messages: 248428
nosy: kbk, markroseman, roger.serwy, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE functional/integration testing
type: enhancement
versions: Python 2.7, Python 3.5, Python 3.6

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



[issue24845] IDLE functional/integration testing

2015-08-11 Thread Mark Roseman

Changes by Mark Roseman m...@markroseman.com:


--
components: +IDLE
keywords: +patch
Added file: http://bugs.python.org/file40164/functionaltests.patch

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



[issue16296] Patch to fix building on Win32/64 under VS 2010

2015-08-11 Thread Mark Lawrence

Mark Lawrence added the comment:

I think this can now be closed as out of date.

--

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



Re: AttributeError

2015-08-11 Thread leo kirotawa
assign using () creates tuple not a list. Tuples have not .sort() method.
correct would be:
ncount = [key,val]

On Tue, Aug 11, 2015 at 9:01 PM, Ltc Hotspot ltc.hots...@gmail.com wrote:
 Hi Everyone,


 What is the list equivalent to line 12: ncount.sort(reverse=True)


 count = dict()
 fname = raw_input(Enter file name: )#
 handle = open (fname, 'r')#
 for line in handle:
 if line.startswith(From ):
 address = line.split()[5]
 line = line.rstrip()
 count[address] = count.get(address, 0) + 1

 for key,val in count.items():
 ncount = (key,val)
 ncount.sort(reverse=True)
 print key,val


 Error message, reads: AttributeError, line 12, below : 'tuple' object has no 
 attribute 'sort'

 Raw data code, available at http://tinyurl.com/ob89r9p
 Embedded data code, available at http://tinyurl.com/qhm4ppq
 Visualization URL link, available at http://tinyurl.com/ozzmffy


 Regards,
 Hal
 --
 https://mail.python.org/mailman/listinfo/python-list



-- 

--
Leônidas S. Barbosa (Kirotawa)
blog: corecode.wordpress.com
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: AttributeError

2015-08-11 Thread MRAB

On 2015-08-12 01:01, Ltc Hotspot wrote:

Hi Everyone,


What is the list equivalent to line 12: ncount.sort(reverse=True)


count = dict()
fname = raw_input(Enter file name: )#
handle = open (fname, 'r')#
for line in handle:
 if line.startswith(From ):
 address = line.split()[5]
 line = line.rstrip()
 count[address] = count.get(address, 0) + 1

for key,val in count.items():
 ncount = (key,val)
 ncount.sort(reverse=True)
 print key,val


Error message, reads: AttributeError, line 12, below : 'tuple' object has no 
attribute 'sort'

Raw data code, available at http://tinyurl.com/ob89r9p
Embedded data code, available at http://tinyurl.com/qhm4ppq
Visualization URL link, available at http://tinyurl.com/ozzmffy

What are you trying to do? Why are you trying to sort a key/value pair 
in reverse order?


--
https://mail.python.org/mailman/listinfo/python-list


Re: AttributeError

2015-08-11 Thread Chris Angelico
On Wed, Aug 12, 2015 at 10:43 AM, Ltc Hotspot ltc.hots...@gmail.com wrote:
 Python can pull the hour from the 'From ' line by finding the time and then
 splitting the string a second time using a colon, i.e., From
 stephen.marqu...@uct.ac.za Sat Jan  5 09:14:16 2008

 Finally, accumulated the counts for each hour, print out the counts, sorted
 by hour as shown below:

In that case, you want to sort the entire collection, not a single
key-value pair.

It seems to me you can do this fairly efficiently with collections.Counter.

import collections
with open(raw_input(Enter file name: )) as f:
counts = collections.Counter(line.split()[5].rstrip() for line in
f if line.startswith(From ))

counts = counts.items()
counts.sort()
for hour, count in counts:
print hour, count

The most important part is getting items() and then sorting the whole thing.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: AttributeError

2015-08-11 Thread Ltc Hotspot
Message heard loud and clear:

There are no error messages, the output is the issue.

Question: What sorted function should I write to produce the desired
output, below:

Desired output:

04 3
06 1
07 1
09 2
10 3
11 6
14 1
15 2
16 4
17 2
18 1
19 1

Latest revised code:

count = dict()
fname = raw_input(Enter file name: )#
handle = open (fname, 'r')#
for line in handle:
if line.startswith(From ):
address = line.split()[5]
line = line.rstrip()
count[address] = count.get(address, 0) + 1

lst = list()
for key,val in count.items():
lst.append( (val, key) )
lst.sort(reverse=True)
for val, key in lst[:12]:
print key,val


Output code:

In [3]: %run assignment_10_2_v_01
Enter file name: mbox-short.txt
16:23:48 1
16:23:48 1
11:11:52 1
17:07:00 1
16:23:48 1
11:11:52 1
17:07:00 1
16:23:48 1
11:11:52 1
04:07:34 1
17:07:00 1
16:23:48 1
11:11:52 1
07:02:32 1
04:07:34 1
17:07:00 1
16:23:48 1
11:12:37 1
11:11:52 1
07:02:32 1
04:07:34 1
17:07:00 1
16:23:48 1
14:50:18 1
11:12:37 1
11:11:52 1
07:02:32 1
04:07:34 1
17:07:00 1
16:23:48 1
14:50:18 1
11:35:08 1
11:12:37 1
11:11:52 1
07:02:32 1
04:07:34 1
17:07:00 1
16:23:48 1
14:50:18 1
11:37:30 1
11:35:08 1
11:12:37 1
11:11:52 1
07:02:32 1
04:07:34 1
18:10:48 1
17:07:00 1
16:23:48 1
14:50:18 1
11:37:30 1
11:35:08 1
11:12:37 1
11:11:52 1
07:02:32 1
04:07:34 1
18:10:48 1
17:07:00 1
16:23:48 1
14:50:18 1
11:37:30 1
11:35:08 1
11:12:37 1
11:11:52 1
11:10:22 1
07:02:32 1
04:07:34 1
19:51:21 1
18:10:48 1
17:07:00 1
16:23:48 1
14:50:18 1
11:37:30 1
11:35:08 1
11:12:37 1
11:11:52 1
11:10:22 1
07:02:32 1
04:07:34 1
19:51:21 1
18:10:48 1
17:07:00 1
16:23:48 1
15:46:24 1
14:50:18 1
11:37:30 1
11:35:08 1
11:12:37 1
11:11:52 1
11:10:22 1
07:02:32 1
19:51:21 1
18:10:48 1
17:07:00 1
16:23:48 1
16:10:39 1
15:46:24 1
14:50:18 1
11:37:30 1
11:35:08 1
11:12:37 1
11:11:52 1
11:10:22 1
19:51:21 1
18:10:48 1
17:07:00 1
16:23:48 1
16:10:39 1
15:46:24 1
14:50:18 1
11:37:30 1
11:35:08 1
11:12:37 1
11:11:52 1
11:10:22 1
19:51:21 1
18:10:48 1
17:07:00 1
16:34:40 1
16:23:48 1
16:10:39 1
15:46:24 1
14:50:18 1
11:37:30 1
11:35:08 1
11:12:37 1
11:11:52 1
19:51:21 1
18:10:48 1
17:07:00 1
16:34:40 1
16:23:48 1
16:10:39 1
15:46:24 1
14:50:18 1
11:37:30 1
11:35:08 1
11:12:37 1
11:11:52 1
19:51:21 1
18:10:48 1
17:07:00 1
16:34:40 1
16:23:48 1
16:10:39 1
15:46:24 1
14:50:18 1
11:37:30 1
11:35:08 1
11:12:37 1
11:11:52 1
19:51:21 1
18:10:48 1
17:07:00 1
16:34:40 1
16:29:07 1
16:23:48 1
16:10:39 1
15:46:24 1
14:50:18 1
11:37:30 1
11:35:08 1
11:12:37 1
19:51:21 1
18:10:48 1
17:07:00 1
16:34:40 1
16:29:07 1
16:23:48 1
16:10:39 1
15:46:24 1
15:03:18 1
14:50:18 1
11:37:30 1
11:35:08 1
19:51:21 1
18:10:48 1
17:07:00 1
16:34:40 1
16:29:07 1
16:23:48 1
16:10:39 1
15:46:24 1
15:03:18 1
14:50:18 1
11:37:30 1
11:35:08 1
19:51:21 1
18:10:48 1
17:07:00 1
16:34:40 1
16:29:07 1
16:23:48 1
16:10:39 1
15:46:24 1
15:03:18 1
14:50:18 1
11:37:30 1
11:35:08 1
19:51:21 1
18:10:48 1
17:07:00 1
16:34:40 1
16:29:07 1
16:23:48 1
16:10:39 1
15:46:24 1
15:03:18 1
14:50:18 1
11:37:30 1
11:35:08 1
19:51:21 1
18:10:48 1
17:18:23 1
17:07:00 1
16:34:40 1
16:29:07 1
16:23:48 1
16:10:39 1
15:46:24 1
15:03:18 1
14:50:18 1
11:37:30 1
19:51:21 1
18:10:48 1
17:18:23 1
17:07:00 1
16:34:40 1
16:29:07 1
16:23:48 1
16:10:39 1
15:46:24 1
15:03:18 1
14:50:18 1
11:37:30 1
19:51:21 1
18:10:48 1
17:18:23 1
17:07:00 1
16:34:40 1
16:29:07 1
16:23:48 1
16:10:39 1
15:46:24 1
15:03:18 1
14:50:18 1
11:37:30 1
19:51:21 1
18:10:48 1
17:18:23 1
17:07:00 1
16:34:40 1
16:29:07 1
16:23:48 1
16:10:39 1
15:46:24 1
15:03:18 1
14:50:18 1
11:37:30 1

In [4]:





Regards,
Hal


 
 
  Error message, reads: AttributeError, line 12, below : 'tuple'
  object has no attribute 'sort'
 
  Raw data code, available at http://tinyurl.com/ob89r9p
  Embedded data code, available at http://tinyurl.com/qhm4ppq
  Visualization URL link, available at http://tinyurl.com/ozzmffy
 
  What are you trying to do? Why are you trying to sort a key/value
  pair in reverse order?
 
  -- 
  https://mail.python.org/mailman/listinfo/python-list
 
 
-- 
https://mail.python.org/mailman/listinfo/python-list


AttributeError

2015-08-11 Thread Ltc Hotspot
Hi Everyone,


What is the list equivalent to line 12: ncount.sort(reverse=True)


count = dict()
fname = raw_input(Enter file name: )#
handle = open (fname, 'r')#
for line in handle: 
if line.startswith(From ):
address = line.split()[5] 
line = line.rstrip()
count[address] = count.get(address, 0) + 1 

for key,val in count.items():
ncount = (key,val)
ncount.sort(reverse=True)
print key,val


Error message, reads: AttributeError, line 12, below : 'tuple' object has no 
attribute 'sort'

Raw data code, available at http://tinyurl.com/ob89r9p
Embedded data code, available at http://tinyurl.com/qhm4ppq
Visualization URL link, available at http://tinyurl.com/ozzmffy


Regards,
Hal
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue24847] Can't import tkinter in Python 3.5.0rc1

2015-08-11 Thread Steve Dower

Steve Dower added the comment:

Zach has the best chance of being able to review, if only because he can 
probably build the installer. I've added all the Windows experts just in case. 
There's quite a bit of MSBuild magic involved here though - I have trouble 
getting good reviews of this kind of change at work :(

For whoever is looking - the InstallFiles items are processed by getting all 
the Included files, stripping SourceBase off the start and replacing it with 
Source (so a nop in this case) and including that file in the installer. The 
file is installed into Target (which is actually a directory reference into the 
installer, but DLLs is as self-explanatory as it seems) plus the relative path 
from TargetBase to the original filename. In this case, the old TargetBase was 
too short and so the file was installed with the last directory segment; after 
the fix the last directory segment is excluded. (Yes, the Source and SourceBase 
changes aren't really necessary, but changing them to match will avoid 
unnecessary questions in the future.)

I should really add more documentation about this... Tools/msi/readme.txt has a 
bit, but not at this level.

--
nosy: +paul.moore, tim.golden, zach.ware
stage:  - commit review

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



Re: AttributeError

2015-08-11 Thread Mark Lawrence

On 12/08/2015 01:49, Chris Angelico wrote:

On Wed, Aug 12, 2015 at 10:43 AM, Ltc Hotspot ltc.hots...@gmail.com wrote:

Python can pull the hour from the 'From ' line by finding the time and then
splitting the string a second time using a colon, i.e., From
stephen.marqu...@uct.ac.za Sat Jan  5 09:14:16 2008

Finally, accumulated the counts for each hour, print out the counts, sorted
by hour as shown below:


In that case, you want to sort the entire collection, not a single
key-value pair.

It seems to me you can do this fairly efficiently with collections.Counter.



Which is exactly what the OP was told on the tutor mailing list several 
days ago, and he's also asked on the core mentorship list earlier today 
as well.


--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

--
https://mail.python.org/mailman/listinfo/python-list


Re: AttributeError

2015-08-11 Thread Ltc Hotspot
Chris,

Check the code and the visualize execution of the code, available at
http://tinyurl.com/p8tgd5h

message reads: NameError: name 'collections' is not defined


Regards,
Hal

On Tue, Aug 11, 2015 at 5:49 PM, Chris Angelico ros...@gmail.com wrote:

 On Wed, Aug 12, 2015 at 10:43 AM, Ltc Hotspot ltc.hots...@gmail.com
 wrote:
  Python can pull the hour from the 'From ' line by finding the time and
 then
  splitting the string a second time using a colon, i.e., From
  stephen.marqu...@uct.ac.za Sat Jan  5 09:14:16 2008
 
  Finally, accumulated the counts for each hour, print out the counts,
 sorted
  by hour as shown below:

 In that case, you want to sort the entire collection, not a single
 key-value pair.

 It seems to me you can do this fairly efficiently with collections.Counter.

 import collections
 with open(raw_input(Enter file name: )) as f:
 counts = collections.Counter(line.split()[5].rstrip() for line in
 f if line.startswith(From ))

 counts = counts.items()
 counts.sort()
 for hour, count in counts:
 print hour, count

 The most important part is getting items() and then sorting the whole
 thing.

 ChrisA
 --
 https://mail.python.org/mailman/listinfo/python-list

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: AttributeError

2015-08-11 Thread Ltc Hotspot
The Assignment:



I'm trying to write Python code to read through a data file and figure out
the distribution by hour of the dat for each message in the data file.

Python can pull the hour from the 'From ' line by finding the time and then
splitting the string a second time using a colon, i.e., From
stephen.marqu...@uct.ac.za Sat Jan  5 09:14:16 2008

Finally, accumulated the counts for each hour, print out the counts, sorted
by hour as shown below:

name = raw_input(Enter file:)
if len(name)  1 : name = mbox-short.txt
handle = open(name)


Desired Output:


04 3
06 1
07 1
09 2
10 3
11 6
14 1
15 2
16 4
17 2
18 1
19 1



Raw data code, available at http://tinyurl.com/ob89r9p
Embedded data code, available at http://tinyurl.com/qhm4ppq
Visualization URL link, available at http://tinyurl.com/ozzmffy

Regards,
Hal

On Tue, Aug 11, 2015 at 5:26 PM, MRAB pyt...@mrabarnett.plus.com wrote:

 On 2015-08-12 01:01, Ltc Hotspot wrote:

 Hi Everyone,


 What is the list equivalent to line 12: ncount.sort(reverse=True)


 count = dict()
 fname = raw_input(Enter file name: )#
 handle = open (fname, 'r')#
 for line in handle:
  if line.startswith(From ):
  address = line.split()[5]
  line = line.rstrip()
  count[address] = count.get(address, 0) + 1

 for key,val in count.items():
  ncount = (key,val)
  ncount.sort(reverse=True)
  print key,val


 Error message, reads: AttributeError, line 12, below : 'tuple' object has
 no attribute 'sort'

 Raw data code, available at http://tinyurl.com/ob89r9p
 Embedded data code, available at http://tinyurl.com/qhm4ppq
 Visualization URL link, available at http://tinyurl.com/ozzmffy

 What are you trying to do? Why are you trying to sort a key/value pair in
 reverse order?

 --
 https://mail.python.org/mailman/listinfo/python-list

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: AttributeError

2015-08-11 Thread MRAB

On 2015-08-12 01:43, Ltc Hotspot wrote:

The Assignment:



I'm trying to write Python code to read through a data file and figure 
out the distribution by hour of the dat for each message in the data file.


Python can pull the hour from the 'From ' line by finding the time and 
then splitting the string a second time using a colon, i.e., From 
stephen.marqu...@uct.ac.za mailto:stephen.marqu...@uct.ac.za Sat Jan 
 5 09:14:16 2008


Finally, accumulated the counts for each hour, print out the counts, 
sorted by hour as shown below:


name = raw_input(Enter file:)
if len(name)  1 : name = mbox-short.txt
handle = open(name)


Desired Output:


04 3
06 1
07 1
09 2
10 3
11 6
14 1
15 2
16 4
17 2
18 1
19 1

Well, line.split()[5] isn't the address, it's the time, e.g. 09:14:16. 
You need to do just a little more work to extract the hour.


I don't know what you think you'll achieve by sorting key/value pairs in 
reverse order. What you should be doing is sorting the keys (hours), 
although sorting the pairs of keys and values (i.e., the items) would 
have the same effect. Have a look at the 'sorted' function.





Raw data code, available at http://tinyurl.com/ob89r9p
Embedded data code, available at http://tinyurl.com/qhm4ppq
Visualization URL link, available at http://tinyurl.com/ozzmffy

Regards,
Hal

On Tue, Aug 11, 2015 at 5:26 PM, MRAB pyt...@mrabarnett.plus.com 
mailto:pyt...@mrabarnett.plus.com wrote:


On 2015-08-12 01:01, Ltc Hotspot wrote:

Hi Everyone,


What is the list equivalent to line 12: ncount.sort(reverse=True)


count = dict()
fname = raw_input(Enter file name: )#
handle = open (fname, 'r')#
for line in handle:
 if line.startswith(From ):
 address = line.split()[5]
 line = line.rstrip()
 count[address] = count.get(address, 0) + 1

for key,val in count.items():
 ncount = (key,val)
 ncount.sort(reverse=True)
 print key,val


Error message, reads: AttributeError, line 12, below : 'tuple'
object has no attribute 'sort'

Raw data code, available at http://tinyurl.com/ob89r9p
Embedded data code, available at http://tinyurl.com/qhm4ppq
Visualization URL link, available at http://tinyurl.com/ozzmffy

What are you trying to do? Why are you trying to sort a key/value
pair in reverse order?

-- 
https://mail.python.org/mailman/listinfo/python-list





--
https://mail.python.org/mailman/listinfo/python-list


[issue22699] cross-compilation of Python3.4

2015-08-11 Thread William Scullin

William Scullin added the comment:

I thought this was originally a help request and was going to re-direct this. 
Cross-compile with 3.4.3 and later seems broken.

Procedure followed:

wget https://www.python.org/ftp/python/3.5.0/Python-3.5.0rc1.tgz
tar -xf Python-3.5.0rc1.tgz
mkdir buildpowerpc64-linux-gnu
cd buildpowerpc64-linux-gnu
../Python-3.5.0rc1/configure \
--disable-shared \
--prefix=/local/soft/python/3.5.0rc1/powerpc64-linux-gnu/gcc-4.4.7
make
make install

# now for the actual cross-compile build

cd ..
mkdir buildpowerpc64-bgq-linux
export 
PYTHON_FOR_BUILD=/local/soft/python/3.5.0rc1/powerpc64-linux-gnu/gcc-4.4.7/bin/python3.5
../Python-3.5.0rc1/configure \
--host=powerpc64-bgq-linux \
--build=powerpc64-linux-gnu \
--disable-ipv6 \
--disable-shared \
ac_cv_pthread_system_supported=yes \
ac_cv_file__dev_ptmx=no \
ac_cv_file__dev_ptc=no \
ac_cv_big_endian_double=yes
make

which succeeds in building a cross-compiled interpreter, then fails to build 
modules as setup.py gets the srcdir wrong:

[wscullin@vestalac1 buildpowerpc64-bgq-linux]$ make
running build
running build_ext
building '_struct' extension
powerpc64-bgq-linux-gcc -fPIC -Wsign-compare -Wunreachable-code -DNDEBUG -g 
-fwrapv -O3 -Wall -Wstrict-prototypes -Werror=declaration-after-statement 
-I../Python-3.5.0rc1/Include -I/local/soft/python/3.5.0rc1/powerpc64-linux-gnu
/gcc-4.4.7/include -I. -IInclude -I/usr/local/include 
-I/local/soft/python/3.5.0rc1/powerpc64-linux-gnu/gcc-4.4.7/include/python3.5m 
-c _struct.c -o build/temp.linux-ppc64-3.5/_struct.o
powerpc64-bgq-linux-gcc: _struct.c: No such file or directory
powerpc64-bgq-linux-gcc: no input files

--
components: +Build, Cross-Build
versions: +Python 3.5

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



[issue24840] implement bool conversion for enums to prevent odd edge case

2015-08-11 Thread Ethan Furman

Ethan Furman added the comment:

Thanks for finding that, Mike.

I'll review and merge in the next few days.

--
assignee:  - ethan.furman
stage:  - patch review

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



[issue24847] Can't import tkinter in Python 3.5.0rc1

2015-08-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3cb97ffd9ddf by Steve Dower in branch '3.5':
Issue #24847: Fixes tcltk installer layout of VC runtime DLL
https://hg.python.org/cpython/rev/3cb97ffd9ddf

New changeset 13ceedb92923 by Steve Dower in branch 'default':
Issue #24847: Fixes tcltk installer layout of VC runtime DLL
https://hg.python.org/cpython/rev/13ceedb92923

--
nosy: +python-dev

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



[issue24847] Can't import tkinter in Python 3.5.0rc1

2015-08-11 Thread Steve Dower

Steve Dower added the comment:

Pull request for 3.5.0 is at 
https://bitbucket.org/larry/cpython350/pull-requests/3/issue-24847-fixes-tcltk-installer-layout/diff.
 When merged, this can change back to normal priority for the rest of the fix.

Long term (probably 3.5.1, possibly 3.5.0rc2 if I can get it done) I want to 
build tcl/tk differently so we don't have the dependency on this unstable part 
of the VC runtime, but deploying it now is the easiest way to keep tcl/tk 
working.

The biggest risk is that extension authors may plan to depend on it - currently 
distutils bdist_ext does not use it, but that is already causing compatibility 
issues with old code (a.k.a. code that needs updating for a newer compiler), so 
there'll be a bit of wait and see. 

Maybe we'll just have to accumulate all versions of vcruntime*.dll from now 
until forever (and backport them), but I hope we can avoid that.

--

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



Re: AttributeError

2015-08-11 Thread Chris Angelico
On Wed, Aug 12, 2015 at 1:05 PM, Ltc Hotspot ltc.hots...@gmail.com wrote:

 Check the code and the visualize execution of the code, available at
 http://tinyurl.com/p8tgd5h

 message reads: NameError: name 'collections' is not defined

I've no idea why you made this Frankenstein monster out of your
original code and my suggestion, because there's no way that's going
to work. Go back to the people who've helped you on the python-tutor
list, and *do what they have requested* in terms of showing code, not
top-posting, and so on.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue16296] Patch to fix building on Win32/64 under VS 2010

2015-08-11 Thread Steve Dower

Steve Dower added the comment:

It doesn't apply to 3.5 or later, so it's up to Martin whether he wants to 
apply it for 3.4. (I suspect not, but I'm not about to preempt his call.)

--
versions:  -Python 3.5

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



[issue24846] Add tests for ``from ... import ...` code

2015-08-11 Thread Brett Cannon

New submission from Brett Cannon:

issue24492 showed that we need some more tests for ceval regarding ``from ... 
import ...`` code.

--
components: Interpreter Core
messages: 248435
nosy: brett.cannon
priority: normal
severity: normal
stage: test needed
status: open
title: Add tests for ``from ... import ...` code
versions: Python 3.6

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



[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-08-11 Thread Brett Cannon

Brett Cannon added the comment:

Created 
https://bitbucket.org/larry/cpython350/pull-requests/2/issue-24492-make-sure-that-from-import/diff
 without the PyUnicode_FromFormat() change as I realized that was conflating 
two changes in one patch and it wasn't even being tested (verified all tests 
still pass and a quick check in the interpreter shows ImportError is still 
raised).

Larry, let me know when you have accepted the PR and I will commit to 3.5 and 
default on hg.python.org.

I also created http://bugs.python.org/issue24846 to track adding more tests for 
the code.

--
assignee: brett.cannon - larry

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



[issue24847] Can't import tkinter in Python 3.5.0rc1

2015-08-11 Thread Steve Dower

Steve Dower added the comment:

Yep, this is my fix for the same issue pre-RC1 not quite working out (I'm 
guessing some difference between my dev box and my build box).

If you go into your DLLs directory there's an extra subdirectory 
(Microsoft.VC140.CRT or similar) with a single DLL in it. Move that DLL up one 
level to the DLLs folder and you should be fine.

I'll work up a setup authoring fix immediately, but really I want to patch 
Tcl/tk to not rely on that DLL so that we can be truly independent of CRT 
versioning.

--
assignee:  - steve.dower
nosy: +larry
priority: normal - release blocker
versions: +Python 3.6

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



[issue16041] poplib: unlimited readline() from connection

2015-08-11 Thread Stephen Coulson

Stephen Coulson added the comment:

Broke for me today. Hacked the _MAXLINE to get around it.
I don't see any size limit on multi-line in rfc. Only requirement is 
dot-stuffing. I think this fix might need a rethink.

--
nosy: +scoulson

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



[issue24847] Can't import tkinter in Python 3.5.0rc1

2015-08-11 Thread Matthew Barnett

Matthew Barnett added the comment:

Yes, I can confirm that that works for me.

--

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



[issue24847] Can't import tkinter in Python 3.5.0rc1

2015-08-11 Thread Mark Lawrence

Mark Lawrence added the comment:

Works fine for me, also on Windows 10 Home 64 bit.

c:\Python35python.exe
Python 3.5.0rc1 (v3.5.0rc1:1a58b1227501, Aug 10 2015, 05:18:45) [MSC v.1900 64 
bit (AMD64)] on win32
Type help, copyright, credits or license for more information.
 import tkinter
 tkinter.__file__
'c:\\Python35\\lib\\tkinter\\__init__.py'

--
nosy: +BreamoreBoy

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



[issue24847] Can't import tkinter in Python 3.5.0rc1

2015-08-11 Thread Steve Dower

Steve Dower added the comment:

Mark, IIRC you've got VS 2015? Anyone with VS 2015 installed (or the full CRT 
redistributable) is unaffected because the required file is already in their 
system path - this includes my build machine, which is why all my tkinter tests 
passed before pushing the release (currently figuring out a way to avoid this 
in future without needing extra machines).

This is also why I'm worried about extensions built with non-distutils based 
tools. Anyone with the compiler has the current version of vcruntime.dll, but 
users may not (this is the versioning issue - someone might build with 
vcruntime150.dll which then won't work with vcruntime140.dll, so I'm trying to 
just block the DLL entirely).

--

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



Re: AttributeError

2015-08-11 Thread Mark Lawrence

On 12/08/2015 04:05, Ltc Hotspot wrote:

Chris,

Check the code and the visualize execution of the code, available at
http://tinyurl.com/p8tgd5h

message reads: NameError: name 'collections' is not defined



Which is why we kept telling you over on the tutor mailing list to show 
us your complete code, not to put it in a link, and also not to top 
post.  Why we bother as volunteers to waste our time on someone such as 
yourself who posts mutiple times but refuses to take any notice of what 
actually gets said I really don't know.


--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

--
https://mail.python.org/mailman/listinfo/python-list