Re: int vs. float

2017-02-10 Thread boB Stepp
On Sat, Feb 11, 2017 at 1:00 AM, Amit Yaron  wrote:
> On 10/02/17 21:15, Peter Pearson wrote:
>>
>> On Fri, 10 Feb 2017 13:59:45 +0200, Amit Yaron 
>> wrote:
>>>
>>> On 10/02/17 04:33, adam14711...@gmail.com wrote:

 My computer programming professor challenged me to figure out a way
 to manipulate my program to display one error message if the user
 input is a zero or a negative number, and a separate error message if
 the user input is a decimal number.  My program starts out:

[snip]

>> What should happen if the user types "1.0"?
>>
>> To be flexible about this possibility, you could accept the number
>> as a float, and then complain if int(num) != num.
>>
> Another option:
> Use 'float' instead of 'int'. and check using the method  'is_integer' of
> floating point numbers:
>
 3.5.is_integer()
> False
 4.0.is_integer()
> True

According to the OP's professor's challenge, the OP needs to recognize
an input of "4.0" as a float and "4" as an integer, and to respond
with an error message in the float case, or "decimal number" case as
the OP phrased it.  Apparently only positive integers are acceptable
input; all other inputs should generate an appropriate error message
by input type.


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


[issue29532] functools.partial is not compatible between 2.7 and 3.5

2017-02-10 Thread Naoyuki Kamo

New submission from Naoyuki Kamo:

The code:
from functools import partial
def f(a):
print(a)
d = {'a': 3}
g = partial(f, **d)
g()
d['a'] = 5 
g()

On python2.7, gets
3
but on python3.5, gets
5

is it a bug?

--
messages: 287594
nosy: naoyuki
priority: normal
severity: normal
status: open
title: functools.partial is not compatible between 2.7 and 3.5
type: behavior
versions: Python 3.5

___
Python tracker 

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



Re: int vs. float

2017-02-10 Thread Amit Yaron

On 10/02/17 21:15, Peter Pearson wrote:

On Fri, 10 Feb 2017 13:59:45 +0200, Amit Yaron  wrote:

On 10/02/17 04:33, adam14711...@gmail.com wrote:

Hello,

My computer programming professor challenged me to figure out a way
to manipulate my program to display one error message if the user
input is a zero or a negative number, and a separate error message if
the user input is a decimal number.  My program starts out:

[snip]

The function int(str) raises the exception ValueError if the input
string does not represent an integer.

Use:

try:
num=int(str)
except ValueError e:
print "Error: not an integer"


What should happen if the user types "1.0"?

To be flexible about this possibility, you could accept the number
as a float, and then complain if int(num) != num.


Another option:
Use 'float' instead of 'int'. and check using the method  'is_integer' 
of floating point numbers:


>>> 3.5.is_integer()
False
>>> 4.0.is_integer()
True

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


[issue28929] Provide a link from documentation back to its source file

2017-02-10 Thread Brett Cannon

Brett Cannon added the comment:

Now that we have migrated to GitHub and Mariatta is a core dev I'm assigning 
this to her. :)

--
assignee: docs@python -> Mariatta

___
Python tracker 

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



[issue27536] Convert readme to reStructuredText

2017-02-10 Thread Zachary Ware

Zachary Ware added the comment:

This has been done in PR2.  Thank you for the patch anyway, Louis, and I'm 
sorry we didn't wind up using it!

--
nosy: +haypo, zach.ware
pull_requests: +33
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions: +Python 3.7 -Python 3.6

___
Python tracker 

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



[issue29528] Encrypt IRC channel details for Travis

2017-02-10 Thread Zachary Ware

Zachary Ware added the comment:

Fixed in PR13.

--
nosy: +zach.ware
pull_requests: +32
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue29531] Update Doc/README.txt to README.rst

2017-02-10 Thread Roger Sachan

Changes by Roger Sachan :


--
pull_requests: +31

___
Python tracker 

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



[issue29438] use after free in key sharing dict

2017-02-10 Thread INADA Naoki

Changes by INADA Naoki :


--
pull_requests: +30

___
Python tracker 

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



[issue29531] Update Doc/README.txt to README.rst

2017-02-10 Thread Roger Sachan

New submission from Roger Sachan:

I have simply updated the document and its references to README.rst (thanks to 
whoever formatted it).

--
assignee: docs@python
components: Documentation
messages: 287590
nosy: Roger Sachan, docs@python
priority: normal
pull_requests: 29
severity: normal
status: open
title: Update Doc/README.txt to README.rst
type: enhancement
versions: Python 3.7

___
Python tracker 

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



[issue29525] Python 2.7.13 for Windows broken (from prompt)

2017-02-10 Thread Eryk Sun

Eryk Sun added the comment:

It doesn't appear to be a crash, but seems like the REPL is quitting because 
there's no input (e.g. like stdin is redirected to NUL). Echo %errorlevel%; 
it's probably 0. 

readline (pyreadline) is probably the culprit. Try the following shell commands 
to temporarily disable it:

ren C:\Python27\Lib\site-packages\readline.py readline.py.bak
del C:\Python27\Lib\site-packages\readline.pyc

If it's not installed, then these commands will fail.

--
nosy: +eryksun

___
Python tracker 

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



Re: os.path.isfile

2017-02-10 Thread eryk sun
On Fri, Feb 10, 2017 at 9:09 PM, Vincent Vande Vyvre
 wrote:
> Le 10/02/17 à 22:03, Vincent Vande Vyvre a écrit :
>> Le 10/02/17 à 21:36, Peter Otten a écrit :
>>> Vincent Vande Vyvre wrote:
 Le 10/02/17 à 19:11, epro...@gmail.com a écrit :
>
> Python 3.5.2
>
> Windows 10
>
> os.path.isfile() no recognise file with double dot?
>
> eg. match.cpython-35.pyc
>
 Interesting, you're right.

 Python 3.4.3 (default, Nov 17 2016, 01:08:31)
 [GCC 4.8.4] on linux
 Type "help", "copyright", "credits" or "license" for more information.
   >>> import os
   >>> os.path.isfile('/home/vincent/oqapy-3/trunk/__pycache__/grid.
 cpython-34.pyc ')
   False

 Why ?
>>>
>>> No idea in the case of the OP -- on Windows a string literal containing a
>>> sequence like "...\t..." is always a good candidate.
>>>
>>> But you probably sneaked in a trailing newline or space -- i. e. 'twas a
>>> pasting mishap ;)
>>>
>> No, it's a copy-paste.
>>
>> No trailing newline.
>>
> OooPs, no newline but just a space.

It works for me in Windows 10:

>>> sys.version_info[:3], sys.getwindowsversion()[:2]
((3, 5, 2), (10, 0))

>>> os.path.isfile(r'__pycache__\match.cpython-35.pyc')
True

We know the problem isn't a typo with trailing spaces or dots, since
Windows strips them from the last path component to be compatible with
MS-DOS (which had a weak excuse to cut corners because it was written
in 8086 assembly):

>>> os.path.isfile(r'__pycache__\match.cpython-35.pyc ... ')
True

Using a file with a name like that in Windows requires a
fully-qualified path prefixed by \\?\ to bypass DOS compatibility
processing.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: subprocess problem

2017-02-10 Thread Cameron Simpson

On 10Feb2017 11:54, Andreas Paeffgen  wrote:

Thanks for all the great advice.
I tested all the possibilities. So far no luck. If i start the app 
from a terminal, the solutions work. But not, if i start the 
app-bundle (There is no connection to a terminal)


1. Copied the path to p.subprocess
2. Used the def wich: python function
3. Used shutil

When there is no Terminal, there is no error message / status code message.


Please show us you code containing the status code check.

I would do some debugging inside the function. Consider writing to a special 
purpose log file, for example like this:


 def your_function(...):
   with open('/path/to/your/logfile.txt', 'a') as logfp:
 print("PATH=".os.environ['PATH'], file=logfp)
 p=Popen(...)
 p.communicate(...)
 print("p.returncode=%r" % (p.returncode))

and any other interesting values that occur to you. This is really simple, and 
doesn't require a terminal or using the logging module.


You can 'tail -f /path/to/your/logfile.txt' in another terminal to watch stuff 
happen as you exercise the program.


Cheers,
Cameron Simpson 
--
https://mail.python.org/mailman/listinfo/python-list


Re: int vs. float

2017-02-10 Thread Dan Sommers
On Fri, 10 Feb 2017 20:46:16 +, Erik wrote:

> Python 3.5.2 (default, Nov 17 2016, 17:05:23)
> [GCC 5.4.0 20160609] on linux
> Type "help", "copyright", "credits" or "license" for more information.
>  >>> 0.5
> 1.0
>  >>> f = float("0.5")
>  >>> i = int(f)
>  >>> i
> 1
>  >>> f
> 1.0
>  >>> i == f
> True
>  >>>
> 
> E.

At least it works both ways:

Python 3.5.3 (default, Jan 19 2017, 14:11:04) 
[GCC 6.3.0 20170118] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> s = "3"
>>> f = float(s)
>>> i = int(s)
>>> i
3
>>> f
3.e+64
>>> i == f
False
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue29524] Move functions to call objects into a new Objects/call.c file

2017-02-10 Thread STINNER Victor

STINNER Victor added the comment:

Benchmarks results.

I don't know if the speedup is purely random, if I was just lucky, or if the 
change really makes Python faster...

spectral_norm is a benchmark highly impacted by code placement.

haypo@speed-python$ python3 -m perf compare_to 
/home/haypo/benchmarks/2017-02-10_00-20-default-e91ec62da088.json 
call_ref_e91ec62da088.json -G --min-speed=5
Slower (1):
- spectral_norm: 242 ms +- 3 ms -> 282 ms +- 2 ms: 1.16x slower (+16%)

Faster (15):
- xml_etree_process: 193 ms +- 4 ms -> 173 ms +- 3 ms: 1.11x faster (-10%)
- call_method: 12.4 ms +- 0.6 ms -> 11.3 ms +- 0.3 ms: 1.10x faster (-9%)
- hexiom: 18.5 ms +- 0.2 ms -> 17.1 ms +- 0.1 ms: 1.09x faster (-8%)
- sympy_expand: 940 ms +- 12 ms -> 866 ms +- 13 ms: 1.09x faster (-8%)
- regex_effbot: 5.39 ms +- 0.09 ms -> 4.99 ms +- 0.06 ms: 1.08x faster (-7%)
- chaos: 235 ms +- 2 ms -> 219 ms +- 2 ms: 1.07x faster (-7%)
- unpickle_pure_python: 686 us +- 11 us -> 639 us +- 7 us: 1.07x faster (-7%)
- chameleon: 22.6 ms +- 0.4 ms -> 21.0 ms +- 0.3 ms: 1.07x faster (-7%)
- nqueens: 220 ms +- 2 ms -> 205 ms +- 3 ms: 1.07x faster (-7%)
- telco: 15.0 ms +- 0.6 ms -> 14.0 ms +- 0.2 ms: 1.07x faster (-6%)
- sympy_str: 423 ms +- 4 ms -> 399 ms +- 3 ms: 1.06x faster (-6%)
- scimark_monte_carlo: 223 ms +- 9 ms -> 211 ms +- 8 ms: 1.06x faster (-6%)
- xml_etree_generate: 223 ms +- 3 ms -> 210 ms +- 2 ms: 1.06x faster (-6%)
- xml_etree_iterparse: 192 ms +- 3 ms -> 182 ms +- 4 ms: 1.05x faster (-5%)
- sympy_sum: 191 ms +- 7 ms -> 181 ms +- 7 ms: 1.05x faster (-5%)

Benchmark hidden because not significant (48): (...)

--

___
Python tracker 

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



[issue29530] Windows buildbots broken by the migration to GitHub (meta issue)

2017-02-10 Thread STINNER Victor

New submission from STINNER Victor:

(*) I noticed test_sax and test_random failures on Windows since CPython moved 
to GitHub. These failures seem to be caused by newlines: see issue #27425.


(*) "AMD64 Windows7 SP1 3.x" fails on the "git" step with:

   'git' is not recognized as an internal or external command

I contacted the slave owner, Jeremy, to ask him to install git.

--
components: Tests
keywords: buildbot
messages: 287587
nosy: haypo
priority: normal
severity: normal
status: open
title: Windows buildbots broken by the migration to GitHub (meta issue)
versions: Python 3.7

___
Python tracker 

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



[issue29514] Add a test case that prevents magic number changes in minor releases

2017-02-10 Thread Eric Snow

Eric Snow added the comment:

This is strictly a problem for the system Python, right?  In that case, can't 
the dist package clear __pycache__ under the system site-packages directory 
(and any other user-read-only dirs) during install of the updated Python?

Is the concern that upgrading Python may force all .pyc files to be re-written 
(perhaps unnecessarily)?  If so, I'm not clear on why it's okay between major 
versions but not minor ones.  Frequency perhaps?  Is the cost of re-compiling 
all .pyc files (which mostly won't happen all at the same time) significant 
enough to warrant changing the status quo, particularly since the magic number 
rarely changes in a minor release?

As one (poor) alternative, we could require re-compiling a .pyc file only if it 
contains the affected bytecode(s).  Granted, that would probably require 
associating every bytecode with a magic number.  The required comparison would 
likely be more expensive than just re-compiling. :/

Another alternative would be to leverage sys.dont_write_bytecode somehow.

--
nosy: +eric.snow

___
Python tracker 

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



[issue29511] Add 'find' as build-in method for lists

2017-02-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Without any test code (other than my examples) to illustrate the desired new 
functionality, I may have misunderstood.  But I read the George's prose (but 
not the SO link) and everything I wrote is relevant to what I thought it said.  
The request appears to be for either what now exists (other than the name and 
failure signal) or what Guido has specifically rejected for non-strings.

Reasons for rejecting subsequence matching:
1. Except for strings, practical use cases seem to be rare.
2. Enhancement could mask bugs.
3. General sequences with nesting (tuples and lists, but not range) have an 
ambiguity problem that strings do not.

[1, 2, [1,2]].index([1,2]) currently returns 2, not 0, and this cannot change.  
Similarly, [1,2] in [1,2,3] should not change from False to True.

Steven, without specific code examples, I do not understand what the 'this' is 
that you think is different from what you say was properly rejected,  The 
request appears to be for extending the meaning of'in' and 'find/index' for 
non-strings. (See last sentence of opening post.) As you note, there are 
several related but different problems.

http://code.activestate.com/recipes/117214/ gives Python code for 
Knuth-Morris-Pratt string matching.  Python uses a C-coded version of either 
this or an alternative in (str/bytes/bytearray).(index/find) Both methods stop 
with the first match, but have a 'start' parameter if one wants repeated 
matches, and one can choose either start as position + 1 or position + 
len(pattern) to allow overlaps or not.

Every presentation of KMP I have seen is as a string algorithm.  In spite of 
the recipe title and argument name ('text'), the author claims that the Python 
code is generic.  Since the recipe discussion only tested strings, I tried

for i in KnuthMorrisPratt([1,2,3,4,5,1,2], [1,2]):
print(i)

and it prints 0 and 5, as claimed.  Nice! Generic subsequence matching is 
easily possible.  I believe the Python code could be rewritten in C with the 
Python C-API and remain generic.

If this idea is not to be dropped, I think the next step should be a 
python-ideas post with a clear function definition and a possible API (which 
will elicit alternative proposals) that avoids the back compatibility problem, 
specific positive and negative test examples, and real-life use cases (which I 
hope might be included in the SO questions).

--

___
Python tracker 

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



[issue29527] Travis: doc job is broken

2017-02-10 Thread Ryan Gonzalez

Ryan Gonzalez added the comment:

Trying to fix this in https://github.com/python/cpython/pull/9...but...

Currently there are approx *pause for effect* 6,245 warnings!

Out of those, around 6,243 are 'reference target not found' warnings, spanning 
over 290 files:


/media/ryan/stuff/cpython/Doc/whatsnew/3.7.rst:121: WARNING: c:member reference 
target not found: doc
/media/ryan/stuff/cpython/Doc/whatsnew/3.7.rst:121: WARNING: c:type reference 
target not found: PyGetSetDef
/media/ryan/stuff/cpython/Doc/whatsnew/3.7.rst:121: WARNING: c:type reference 
target not found: wrapperbase
/media/ryan/stuff/cpython/Doc/whatsnew/3.7.rst:157: WARNING: py:mod reference 
target not found: ntpath
../../Misc/NEWS:348: WARNING: py:data reference target not found: 
socket.TCP_CONGESTION
../../Misc/NEWS:348: WARNING: py:data reference target not found: 
socket.TCP_USER_TIMEOUT
../../Misc/NEWS:1005: WARNING: py:data reference target not found: 
socket.TCP_CONGESTION
../../Misc/NEWS:1005: WARNING: py:data reference target not found: 
socket.TCP_USER_TIMEOUT
../../Misc/NEWS:2718: WARNING: py:obj reference target not found: idlelib/*.py
../../Misc/NEWS:2718: WARNING: py:obj reference target not found: 
idle_test/test_*.py
../../Misc/NEWS:2837: WARNING: c:func reference target not found: malloc
../../Misc/NEWS:2883: WARNING: c:func reference target not found: 
PyObject_Malloc


For some reason, I don't feel like fixing 6,200 warnings is really feasible (or 
at least for me), so would it be worth it to, in the mean time, disable this 
specific kind of warning, at least for the CI builds?

--
nosy: +refi64

___
Python tracker 

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



[issue29428] Doctest documentation unclear about multi-line fixtures

2017-02-10 Thread Jim DeLaHunt

Jim DeLaHunt added the comment:

I've drafted some fairly restricted changes to the doctest documentation page. 
They are in my Github branch, 
https://github.com/JDLH/cpython/tree/Issue29428_doctest_docs . The diffs are at 
https://github.com/JDLH/cpython/commit/223ef8f8a6d2fbec6db774912028abb4d2ff88b6 
. 

There currently is no official Python github repot against which to make a pull 
request. In a few days, once it appears, I'll make a pull request.

In the meantime, I can take review comments and improve it. If you are 
interested, please review.

--

___
Python tracker 

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



[issue29524] Move functions to call objects into a new Objects/call.c file

2017-02-10 Thread STINNER Victor

STINNER Victor added the comment:

We have moved to GitHub and mandatory reviews with Pull Requests. So I created 
the PR #12 and removed the patch attached to this issue to avoid confusion.

--

___
Python tracker 

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



[issue29524] Move functions to call objects into a new Objects/call.c file

2017-02-10 Thread STINNER Victor

Changes by STINNER Victor :


Removed file: http://bugs.python.org/file46624/call.patch

___
Python tracker 

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



[issue29524] Move functions to call objects into a new Objects/call.c file

2017-02-10 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +28

___
Python tracker 

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



[issue29518] 'for' loop not automatically breaking (index error on line of loop header)

2017-02-10 Thread Justin McNiel

Justin McNiel added the comment:

While restarting didn't fix it, waiting for the next morning did, so I am
afraid that that isn't possible, also, I have made tremendous changes to my
code since then, but I would by happy to send you any bit of my code that
you would like, it cold also be an issue with my computer, our IT
department is very work heavy and doesn't always install the operating
system properly (ie. not installing the driver for the touchpad)

On Feb 10, 2017 4:53 AM, "Steven D'Aprano"  wrote:

>
> Steven D'Aprano added the comment:
>
> I agree with Josh: the exception you are giving doesn't seem possible with
> the code snippet shown. Please COPY AND PASTE (not a screen shot) the text
> of the entire traceback, starting with the line "Traceback..."
>
> I suspect that you may have shadowed the built-in range or len object with
> some custom object, but I could be completely wrong. But without more
> information, we cannot tell what is going on.
>
> It would be really useful if you could provide a minimal (short as
> possible) script that reproduces the problem. And please confirm that you
> can reproduce the problem in the regular CPython interpreter, without using
> any third-party IDEs.
>
> --
> nosy: +steven.daprano
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue23404] 'make touch' does not work with git clones of the source repository

2017-02-10 Thread Zachary Ware

Zachary Ware added the comment:

I've disabled the Touch step on the buildbots until this is fixed.

--
keywords: +buildbot
nosy: +zach.ware
priority: normal -> critical
versions: +Python 2.7, Python 3.7

___
Python tracker 

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



[issue29527] Travis: doc job is broken

2017-02-10 Thread STINNER Victor

STINNER Victor added the comment:

> And we shouldn't disable the check entirely if fixing it is difficult, but 
> instead just let warnings be warnings until we fix all warnings and then make 
> them be errors again.

Ok, I changed my change (I got the same proposal in the PR). So I removed -W 
option:
https://github.com/python/cpython/commit/0d5f11061a873e9fb67ae59e46b3313e5ba22fc3

--

___
Python tracker 

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



[issue29525] Python 2.7.13 for Windows broken (from prompt)

2017-02-10 Thread STINNER Victor

STINNER Victor added the comment:

To get more information during the Python initialization, you can try to run:

python -X faulthandler -S -v

* -X faulthandler: dump a traceback if python crashed (is it the case? I don't 
understand from the bug report)
* -S disables the site module
* -v enables verbose mode

--

___
Python tracker 

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



[issue29525] Python 2.7.13 for Windows broken (from prompt)

2017-02-10 Thread Frak N

Frak N added the comment:

c:\Python27>SET PY
Environment variable PY not defined


I don't know anything about readline or how to find what uses it.

--

___
Python tracker 

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



[issue29529] Backport Travis configuration

2017-02-10 Thread Brett Cannon

Changes by Brett Cannon :


--
dependencies: +Encrypt IRC channel details for Travis

___
Python tracker 

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



[issue29529] Backport Travis configuration

2017-02-10 Thread Brett Cannon

New submission from Brett Cannon:

Once the Travis config stabilizes then it should be backported to all active 
branches.

--
assignee: brett.cannon
messages: 287576
nosy: brett.cannon
priority: normal
severity: normal
status: open
title: Backport Travis configuration
versions: Python 2.7, Python 3.5, Python 3.6

___
Python tracker 

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



[issue29528] Encrypt IRC channel details for Travis

2017-02-10 Thread Brett Cannon

Changes by Brett Cannon :


--
title: Encrypt IRC channel details -> Encrypt IRC channel details for Travis

___
Python tracker 

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



[issue29528] Encrypt IRC channel details

2017-02-10 Thread Brett Cannon

New submission from Brett Cannon:

Donald pointed out on IRC we should encrypt a channel key for IRC so that it 
doesn't get flooded from people's forks. See 
https://docs.travis-ci.com/user/notifications#Channel-key for documentation on 
how to do this.

--
messages: 287575
nosy: brett.cannon, dstufft, r.david.murray
priority: high
severity: normal
status: open
title: Encrypt IRC channel details

___
Python tracker 

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



Re: problem with Python 3.6 + PyX

2017-02-10 Thread stalker5


Yes, I have a Tex engine on my system.
How can i fix the problem with the PATH ?
Even if i execute the .py script directly by python (I mean :not inside 
a LateX file) pyx need to reach the TeX system ?

Is there a config file  to fix the PATH ? Where ?

Thanks a lot !! Ciao
--
Olivier


PyX requires TeX to render textual glyphs into the image. Do you have it
installed? If so, is it "reachable" by your $PATH variable?

A quick test to re-render my PyX-based images with Python 3.6 didn't reveal
any problem...

ciao, lele.



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


[issue29527] Travis: doc job is broken

2017-02-10 Thread Brett Cannon

Brett Cannon added the comment:

What would it take to simply fix the docs?

And we shouldn't disable the check entirely if fixing it is difficult, but 
instead just let warnings be warnings until we fix all warnings and then make 
them be errors again.

--
nosy: +brett.cannon

___
Python tracker 

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



[issue29527] Travis: doc job is broken

2017-02-10 Thread STINNER Victor

New submission from STINNER Victor:

I suggest to disable the job until it's fixed, just to fix Travis right now. 
This issue will track the bug to find a solution.

https://travis-ci.org/python/cpython/jobs/200517775

$ make html SPHINXBUILD="./venv/bin/python3 -m sphinx" SPHINXOPTS="-nW -q -b 
linkcheck"
./venv/bin/python3 -m sphinx -b html -d build/doctrees -D latex_paper_size= -nW 
-q -b linkcheck . build/html 

Warning, treated as error:
WARNING: latex_preamble is deprecated. Use latex_elements['preamble'] instead.

make: *** [build] Error 1

--
components: Tests
messages: 287573
nosy: haypo
priority: normal
severity: normal
status: open
title: Travis: doc job is broken
versions: Python 3.7

___
Python tracker 

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



[issue29511] Add 'find' as build-in method for lists

2017-02-10 Thread Steven D'Aprano

Steven D'Aprano added the comment:

Terry, I'm not sure if you've read this enhancement request correctly or not, 
because your reply when closing covers over a lot of detail which is not 
relevant to this feature request.

> Extending this idea to 'subsequence in sequence' or 
> sequence.index(subsequence) has been rejected.

And so it should, as that is a major break with backwards compatibility, but 
that is not what this feature request is about.

Including George's link, I count at least five questions on StackOverflow 
asking about this functionality: how to do subsequence tests in sequences apart 
from strings. That, and the interest in the recipes on ActiveState (here's 
another: http://code.activestate.com/recipes/117214/ ) indicate a reasonable 
level of interest in this feature.

In Python today, there is no obvious, good, correct way to do this in the 
standard library, just a bunch of hacks and tricks which solve slightly 
different problems.

Unless the very idea of subsequence matching has been rejected (which would 
surprise me greatly) I'm going to re-open this ticket. Any objections?

--

___
Python tracker 

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



[issue29521] Minor warning messages when compiling documentation

2017-02-10 Thread Jim DeLaHunt

Jim DeLaHunt added the comment:

My Pull Request was closed, because apparently  
https://github.com/python/cpython/ will not be the new GitHub repo for Python. 
The actual repo will open on 11. Feb, I'm told. I will repeat the PR there. 
Please stand by.

--

___
Python tracker 

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



Re: os.path.isfile

2017-02-10 Thread Vincent Vande Vyvre

Le 10/02/17 à 22:03, Vincent Vande Vyvre a écrit :

Le 10/02/17 à 21:36, Peter Otten a écrit :

Vincent Vande Vyvre wrote:


Le 10/02/17 à 19:11, epro...@gmail.com a écrit :

Hello NG

Python 3.5.2

Windows 10

os.path.isfile() no recognise file with double dot?

eg. match.cpython-35.pyc

Please somebody know something about that?

Thank You in advance


Interesting, you're right.

Python 3.4.3 (default, Nov 17 2016, 01:08:31)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
  >>> import os
  >>>

os.path.isfile('/home/vincent/oqapy-3/trunk/__pycache__/grid.cpython-34.pyc 


')
False


Why ?
No idea in the case of the OP -- on Windows a string literal 
containing a

sequence like "...\t..." is always a good candidate.

But you probably sneaked in a trailing newline or space -- i. e. 'twas a
pasting mishap ;)



No, it's a copy-paste.

No trailing newline.


OooPs, no newline but just a space.


I'm using frequently the copy-paste of file name into a terminal and I 
don't never see that.


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


Re: os.path.isfile

2017-02-10 Thread Vincent Vande Vyvre

Le 10/02/17 à 21:36, Peter Otten a écrit :

Vincent Vande Vyvre wrote:


Le 10/02/17 à 19:11, epro...@gmail.com a écrit :

Hello NG

Python 3.5.2

Windows 10

os.path.isfile() no recognise file with double dot?

eg. match.cpython-35.pyc

Please somebody know something about that?

Thank You in advance


Interesting, you're right.

Python 3.4.3 (default, Nov 17 2016, 01:08:31)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
  >>> import os
  >>>


os.path.isfile('/home/vincent/oqapy-3/trunk/__pycache__/grid.cpython-34.pyc

')
False


Why ?

No idea in the case of the OP -- on Windows a string literal containing a
sequence like "...\t..." is always a good candidate.

But you probably sneaked in a trailing newline or space -- i. e. 'twas a
pasting mishap ;)



No, it's a copy-paste.

No trailing newline.

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


Re: int vs. float

2017-02-10 Thread Erik

On 10/02/17 19:15, Peter Pearson wrote:
> On Fri, 10 Feb 2017 13:59:45 +0200, Amit Yaron  
wrote:

>> Use:
>>
>> try:
>>num=int(str)
>> except ValueError e:
>>print "Error: not an integer"
>
> What should happen if the user types "1.0"?
>
> To be flexible about this possibility, you could accept the number
> as a float, and then complain if int(num) != num.

Python 3.5.2 (default, Nov 17 2016, 17:05:23)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 0.5
1.0
>>> f = float("0.5")
>>> i = int(f)
>>> i
1
>>> f
1.0
>>> i == f
True
>>>

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


[issue29526] Documenting format() function

2017-02-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

+1 of Serhiy's ideas.  I was not aware that FORMATTING had been added.  And 
this could be specifically helpful.

>>> help(int.__format__)
Help on method_descriptor:

__format__(...)
default object formatter

--
nosy: +terry.reedy

___
Python tracker 

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



Re: os.path.isfile

2017-02-10 Thread Peter Otten
Vincent Vande Vyvre wrote:

> Le 10/02/17 à 19:11, epro...@gmail.com a écrit :
>> Hello NG
>>
>> Python 3.5.2
>>
>> Windows 10
>>
>> os.path.isfile() no recognise file with double dot?
>>
>> eg. match.cpython-35.pyc
>>
>> Please somebody know something about that?
>>
>> Thank You in advance
>>
> Interesting, you're right.
> 
> Python 3.4.3 (default, Nov 17 2016, 01:08:31)
> [GCC 4.8.4] on linux
> Type "help", "copyright", "credits" or "license" for more information.
>  >>> import os
>  >>> 
> 
os.path.isfile('/home/vincent/oqapy-3/trunk/__pycache__/grid.cpython-34.pyc
> ')
> False
> 
> 
> Why ?

No idea in the case of the OP -- on Windows a string literal containing a 
sequence like "...\t..." is always a good candidate.

But you probably sneaked in a trailing newline or space -- i. e. 'twas a 
pasting mishap ;) 


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


Re: os.path.isfile

2017-02-10 Thread MRAB

On 2017-02-10 19:50, Vincent Vande Vyvre wrote:

Le 10/02/17 à 19:11, epro...@gmail.com a écrit :

Hello NG

Python 3.5.2

Windows 10

os.path.isfile() no recognise file with double dot?

eg. match.cpython-35.pyc

Please somebody know something about that?

Thank You in advance


Interesting, you're right.

Python 3.4.3 (default, Nov 17 2016, 01:08:31)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
 >>> import os
 >>>
os.path.isfile('/home/vincent/oqapy-3/trunk/__pycache__/grid.cpython-34.pyc
')
False


Why ?


It looks like the path has a space on the end. Is that true?

(I haven't been able to reproduce the problem, incidentally.)

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


Re: os.path.isfile

2017-02-10 Thread Chris Angelico
On Sat, Feb 11, 2017 at 6:50 AM, Vincent Vande Vyvre
 wrote:
> Interesting, you're right.
>
> Python 3.4.3 (default, Nov 17 2016, 01:08:31)
> [GCC 4.8.4] on linux
> Type "help", "copyright", "credits" or "license" for more information.
 import os

 os.path.isfile('/home/vincent/oqapy-3/trunk/__pycache__/grid.cpython-34.pyc
 ')
> False

Works on my system, in 3.4, 3.5, 3.6, and 3.7:

Python 3.4.4 (default, Apr 17 2016, 16:02:33)
[GCC 5.3.1 20160409] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.path.isfile("__pycache__/foo.cpython-36.pyc")
True

There's gotta be a difference here somewhere.

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


[issue29511] Add 'find' as build-in method for lists

2017-02-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Lists, tuples, ranges, dicts, and other builtin collection objects already work 
with 'in'.

>>> 1 in [1,2,3]
True
>>> 4 in range(9)
True

For historical reasons, stings have both 'find' and 'index'.  The only 
difference is returning -1 (a C-ism) versus raising ValueError on failure.  
They are otherwise redundant.

Lists, tuples, and ranges, and other builtin sequence objects already  have 
'index'.  There is no need to repeat the redundancy of 'find'.

>>> [1,2,3].index(2)
1
>>> [1,2,3].index(4)
Traceback (most recent call last):
  File "", line 1, in 
[1,2,3].index(4)
ValueError: 4 is not in list
>>> range(9).index(4)
4

Strings are a special case of collection in that they 'contain' substrings 
rather than items of a different class.  For this reason, 'in' and index/find 
are special-cased also work with contiguous substrings of length greater than 1.

>>> 'ac' in 'abc'
False
>>> 'ab' in 'abc'
True

Extending this idea to 'subsequence in sequence' or sequence.index(subsequence) 
has been rejected.

Note: __cmp__ does not exist in 3.x.  Collection 'in' and sequence 'index' 
check object identity before equality to guarantee that an object in a 
collection (in the common sense of the term) is actually found even if it has a 
screwy definition of __eq__.

>>> nan = float('nan')
>>> nan == nan
False
>>> nan in [nan]
True
>>> float('nan') in [float('nan')]
False
>>> [nan].index(nan)
0

--
nosy: +terry.reedy
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



Re: os.path.isfile

2017-02-10 Thread Vincent Vande Vyvre

Le 10/02/17 à 19:11, epro...@gmail.com a écrit :

Hello NG

Python 3.5.2

Windows 10

os.path.isfile() no recognise file with double dot?

eg. match.cpython-35.pyc

Please somebody know something about that?

Thank You in advance


Interesting, you're right.

Python 3.4.3 (default, Nov 17 2016, 01:08:31)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> 
os.path.isfile('/home/vincent/oqapy-3/trunk/__pycache__/grid.cpython-34.pyc 
')

False


Why ?

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


[issue29505] Submit the re, json, & csv modules to oss-fuzz testing

2017-02-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

It does not appear to me that targets have to be security critical, though that 
is certainly a good place to start.  The Chrome tests found 100s of "security 
vulnerabilities and stability bugs".

The important thing is that there be someone willing to receive and act on 
reports.  Would 'make public after 90 days' ever be a problem?  AFAIK, most 
Python security issues are already public here on the tracker from day 1.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue29518] 'for' loop not automatically breaking (index error on line of loop header)

2017-02-10 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue29523] latest setuptools breaks virtualenvs due to unbundling dependencies

2017-02-10 Thread Charalampos Stratakis

Charalampos Stratakis added the comment:

Second version of the patch:

Adjusted the test_ensurepip test cases to account for the new modules

--
Added file: 
http://bugs.python.org/file46627/bundle-setuptools-dependencies2.patch

___
Python tracker 

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



Re: int vs. float

2017-02-10 Thread Peter Pearson
On Fri, 10 Feb 2017 13:59:45 +0200, Amit Yaron  wrote:
> On 10/02/17 04:33, adam14711...@gmail.com wrote:
>> Hello,
>>
>> My computer programming professor challenged me to figure out a way
>> to manipulate my program to display one error message if the user
>> input is a zero or a negative number, and a separate error message if
>> the user input is a decimal number.  My program starts out:
[snip]
> The function int(str) raises the exception ValueError if the input 
> string does not represent an integer.
>
> Use:
>
> try:
>num=int(str)
> except ValueError e:
>print "Error: not an integer"

What should happen if the user types "1.0"?

To be flexible about this possibility, you could accept the number
as a float, and then complain if int(num) != num.

-- 
To email me, substitute nowhere->runbox, invalid->com.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue29481] 3.6.0 doc describes 3.6.1 feature - typing.Deque

2017-02-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The online docs are regenerated daily from the current repository, so the 
inclusion of typing.Deque in the doc is correct, given that it has been added 
to the module.  IDLE aside, new features in bugfix releases are limited to 
provisional modules, such as typing.  I believe this should get a 'New in 
3.6.1' (or 3.5.?) note.

Some installations include a local frozen copy of the docs.  The frozen copy 
will not include the rare (and admittedly confusing) feature added for a future 
release.  But it will also not include the much more common corrections and 
clarifications added since the release.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue29438] use after free in key sharing dict

2017-02-10 Thread INADA Naoki

INADA Naoki added the comment:

I'll send PR to github.  Please continue there.

--

___
Python tracker 

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



[issue29438] use after free in key sharing dict

2017-02-10 Thread INADA Naoki

INADA Naoki added the comment:

Since Python 3.5's key sharing dict allows deletion, py35-2.patch is slightly 
different from py36-2.patch.

Since dictresize won't happen in normal (no weakref/__del__ callback)  deletion,
I removed `CACHED_KEYS(tp) = NULL` entirely.

--
Added file: 
http://bugs.python.org/file46626/29438-sharedkey-useafterfree-py35-2.patch

___
Python tracker 

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



os.path.isfile

2017-02-10 Thread eproser
Hello NG

Python 3.5.2

Windows 10

os.path.isfile() no recognise file with double dot?

eg. match.cpython-35.pyc

Please somebody know something about that?

Thank You in advance

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


[issue29514] Add a test case that prevents magic number changes in minor releases

2017-02-10 Thread Petr Viktorin

Petr Viktorin added the comment:

According to issue27286, Ubuntu 16.04LTS has the fix and uses the new magic 
number. (And this is one reason undoing the change in CPython is out of the 
question.)


The patch Nick mentioned is brewing at 
https://github.com/encukou/cpython/commit/magic-number-workaround .

--

___
Python tracker 

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



[issue29514] Add a test case that prevents magic number changes in minor releases

2017-02-10 Thread Nick Coghlan

Nick Coghlan added the comment:

Ah, interesting. The install-time generation case is even trickier, since you 
presumably can't force in-place regeneration of existing pyc files on systems 
that previously had 3.5.2 and upgraded to 3.5.3.

When I last spoke to Peter about this yesterday, he was exploring the idea of a 
downstream-only patch to 3.5.3 that gave it the ability to load pyc files that 
used the 3.5.2 magic number (so it would *emit* files with the new magic 
number, but still allow use of pyc files with the old one). Assuming he can get 
that to work, then I guess it may be of interest to Debian & Ubuntu as well.

--

___
Python tracker 

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



[issue29514] Add a test case that prevents magic number changes in minor releases

2017-02-10 Thread Petr Viktorin

Petr Viktorin added the comment:

> How would you propose to fix broken bytecodes in a bugfix be fixed if you 
> can't bump the magic number?

That would depend on the situation. I can imagine that if the bug is severe 
enough, the number could be bumped, after careful discussion, and with the 
change being advertised rather loudly.
The test case that's proposed can be changed if it's indeed the best thing to 
do, but it should at the very least be mentioned in release notes.


FWIW, I'm not convinced the bug here was severe enough. Practically no one is 
using the 3.5+ syntax in libraries: we checked to find that *zero* packages in 
Fedora are using the affected opcode. But that's moot now – wider discussion on 
that should have happened before the release.

--

___
Python tracker 

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



Re: subprocess problem

2017-02-10 Thread Andreas Paeffgen

Thanks for all the great advice.
I tested all the possibilities. So far no luck. If i start the app from 
a terminal, the solutions work. But not, if i start the app-bundle 
(There is no connection to a terminal)


1. Copied the path to p.subprocess
2. Used the def wich: python function
3. Used shutil

When there is no Terminal, there is no error message / status code message.


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


[issue29514] Add a test case that prevents magic number changes in minor releases

2017-02-10 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

On Feb 10, 2017, at 05:46 PM, Nick Coghlan wrote:

>Note that Fedora doesn't even rebuild all the extension modules when bumping
>CPython to a new maintenance release, let alone rebuilding and re-releasing
>all the pure Python ones. (RPM supports doing that just fine, but it would
>mean shipping thousands of updated binary artifacts instead of just one - the
>new CPython maintenance release)

Debian/Ubuntu doesn't rebuild extension modules either.  We don't ship .pyc
files in binary packages, but instead build them at install time on the user's
machine.

--

___
Python tracker 

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



[issue29524] Move functions to call objects into a new Objects/call.c file

2017-02-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

It is hard to make a review of changes of such kind. Common reviewing tools 
don't help with this. I would suggest you to make a series of commits that move 
a code from different files after migrating to Git. It may be easier to make a 
post-commit review.

I said about Python/ because Object/ contains mainly implementations of 
concrete builtin types and Python/ contains some utility files (getargs.c, 
modsupport.c). But I think Objects/ is good place too.

--

___
Python tracker 

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



[issue29514] Add a test case that prevents magic number changes in minor releases

2017-02-10 Thread Nick Coghlan

Nick Coghlan added the comment:

Note that Fedora doesn't even rebuild all the extension modules when bumping 
CPython to a new maintenance release, let alone rebuilding and re-releasing all 
the pure Python ones. (RPM supports doing that just fine, but it would mean 
shipping thousands of updated binary artifacts instead of just one - the new 
CPython maintenance release)

--

___
Python tracker 

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



[issue29514] Add a test case that prevents magic number changes in minor releases

2017-02-10 Thread Nick Coghlan

Nick Coghlan added the comment:

We *do* ship the bytecode in the built RPMs - the issue is that Python 
maintenance releases shouldn't be triggering rebuilds of thousands of system 
components (cf http://fedora.portingdb.xyz/ ) and potentially breaking 
otherwise working end user applications.

As far as "What about bytecode generation bugs?" goes, then my answer would be 
to find a way to fix the bug for freshly generated bytecode, without forcing 
stale bytecode to be regenerated. That way folks that actually hit the original 
bug have a way of solving it (clear their bytecode cache), while we also don't 
forcibly break the world.

That is, the problem with the resolution of issue 27836 wasn't fixing the 
bytecode generation when using double-star unpacking twice in a single function 
call - it was forcing the regeneration of *all* bytecode just because *some* 
bytecode would be broken if it used a particular new language feature. It's the 
equivalent of deliberately breaking the ABI for all extension modules just 
because we found a header bug affecting one particular function signature.

--

___
Python tracker 

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



[issue29481] 3.6.0 doc describes 3.6.1 feature - typing.Deque

2017-02-10 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi :


--
nosy: +levkivskyi

___
Python tracker 

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



[issue29524] Move functions to call objects into a new Objects/call.c file

2017-02-10 Thread STINNER Victor

STINNER Victor added the comment:

Oh, it's painful to have reviews and comments in two websites. Serhiy
left a comment on the review in fact:
"Should be added also in PCbuild/pythoncore.vcxproj.filters."

--

___
Python tracker 

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



[issue29524] Move functions to call objects into a new Objects/call.c file

2017-02-10 Thread STINNER Victor

STINNER Victor added the comment:

Serhiy Storchaka added the comment:
> I would delay pushing this change until CPython repository be converted to 
> Git. I heard Git better supports moving a code between files. And perhaps it 
> might be easier to do this change by several commits -- separately moving a 
> code from different files.

Mercurial requires to use "hg cp file1.c file2.c" to keep file1
history in file2.

Git doesn't care. It is "smarter" (more convenient?). It uses an
heuristic to automatically detect when code is moved between files.

The migration to GitHub is ongoing, we are no more able to push to
Mercurial anyway :-D

Any remark about call.c content itself? Does it look good to you?

--

___
Python tracker 

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



Re: Repeating of posts

2017-02-10 Thread Tim Golden

On 10/02/2017 16:20, Rob Gaddi wrote:

On 02/10/2017 07:25 AM, Grant Edwards wrote:

On 2017-02-10, Cecil Westerhof  wrote:


I see a lot of post delivered multiple times. Is that a problem at my
side, or are others experiencing this also?


I see it too.  Same as a a month or two back, but not as much.




I pinged Wolfgang, who runs eternal-september, and he figured out why
comp.lang.python has been getting all those weird echos from
f38.n261.nz, hunted down the malefactor and put a stop to it. So that
part of the problem should at least be fixed.



Thanks very much. We've been filtering them out at the gateway to the 
mailing list as a practical expedient, but we hadn't got as far as 
trying to find the source.


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


[issue29514] Add a test case that prevents magic number changes in minor releases

2017-02-10 Thread Brett Cannon

Brett Cannon added the comment:

OK, but how would you propose to fix broken bytecodes in a bugfix be fixed if 
you can't bump the magic number? And why aren't you regenerating the bytecode 
when updating Python or shipping the bytecode with the install (and I bet the 
answer is "RPM doesn't support it" and "it goes against packaging guidelines to 
include auto-generated files", but I thought I would ask :) .

--

___
Python tracker 

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



[issue29514] Add a test case that prevents magic number changes in minor releases

2017-02-10 Thread Nick Coghlan

Nick Coghlan added the comment:

There are a couple of pieces to it:

- first, there's the problem of breaking anyone that actually is doing pyc-only 
distribution, even though nothing in Fedora itself does that. While that aspect 
doesn't break Fedora per se, it does break Fedora's compatibility expectations 
for end user components, which maintenance updates shouldn't do

- however, more importantly in this case, ordinary users don't have write 
access to the system site-packages directory, so the pyc files have to be 
pre-compiled when generating the system RPMs.

While CPython falls back to the slow path of recompiling from source when those 
precompiled files are invalidated so nothing obviously breaks, it still 
generates a lot of SELinux warnings related to unauthorised write attempts to 
system-owned directories: 
https://bodhi.fedoraproject.org/updates/python3-3.5.3-1.fc25%20python3-docs-3.5.3-1.fc25#comment-559458

(Debian uses a similar pre-compilation trick for the same reasons, so I expect 
you'd also see comparable warnings under AppArmor if packages weren't rebuilt 
after a magic number change)

This all means that CPython changing the magic number in a maintenance release 
ends up being akin to breaking the C ABI in a maintenance release - while it 
isn't quite as dire (since there's still the slow path fallback to recompiling 
from source), it does still invalidate all of the pyc files in the system RPMs 
until they're rebuilt against the new version. "Requires a mass rebuild of all 
the Python packages in the distro to get things working properly again" is 
again a major concern for what's nominally a low impact maintenance update.

I realise those consequences aren't particularly obvious for non-distro 
developers, which is why I'd like to see the previous policy of "don't change 
the magic number in maintenance releases" captured as a test case.

--

___
Python tracker 

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



[issue29523] latest setuptools breaks virtualenvs due to unbundling dependencies

2017-02-10 Thread Charalampos Stratakis

Charalampos Stratakis added the comment:

Will send a pull request which includes the extra wheels.

--

___
Python tracker 

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



Re: Repeating of posts

2017-02-10 Thread Rob Gaddi

On 02/10/2017 07:25 AM, Grant Edwards wrote:

On 2017-02-10, Cecil Westerhof  wrote:


I see a lot of post delivered multiple times. Is that a problem at my
side, or are others experiencing this also?


I see it too.  Same as a a month or two back, but not as much.




I pinged Wolfgang, who runs eternal-september, and he figured out why 
comp.lang.python has been getting all those weird echos from 
f38.n261.nz, hunted down the malefactor and put a stop to it. So that 
part of the problem should at least be fixed.


--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order.  See above to fix.
--
https://mail.python.org/mailman/listinfo/python-list


[issue29514] Add a test case that prevents magic number changes in minor releases

2017-02-10 Thread Brett Cannon

Brett Cannon added the comment:

Why shouldn't the magic number be bumped when a bug in the bytecode is fixed in 
a bugfix release? How did this break Fedora? Are you not shipping source code 
but only .pyc files?

I view the whole point of having the magic number is to cover things like this, 
otherwise we might as well just embed the CPython version number in the file 
name and be done with it.

--

___
Python tracker 

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



[issue29526] Documenting format() function

2017-02-10 Thread Hugo Prod'homme

Hugo Prod'homme added the comment:

+1 :
Adding the reference to help('FORMATTING') will indeed solve all the problems I 
was thinking about at first.

--

I realized I was thinking only about a small part of the problem thanks to your 
answers. I wasn't even thinking about the dates and other types... So I agree 
applying my first idea will be a big mess.

(... and yes I was referring to printf formatting)

--

___
Python tracker 

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



[issue29526] Documenting format() function

2017-02-10 Thread R. David Murray

R. David Murray added the comment:

Serhiy: those are both great ideas.  +1 from me too.  Then we can even have the 
date formatting documented without cluttering up the main docstring, if we wish 
:)  The format docstring should then also mention doing help on the __format__ 
method of concrete types.

--

___
Python tracker 

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



Re: Repeating of posts

2017-02-10 Thread Grant Edwards
On 2017-02-10, Cecil Westerhof  wrote:

> I see a lot of post delivered multiple times. Is that a problem at my
> side, or are others experiencing this also?

I see it too.  Same as a a month or two back, but not as much.

-- 
Grant Edwards   grant.b.edwardsYow! Do you like "TENDER
  at   VITTLES"?
  gmail.com

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


[issue29526] Documenting format() function

2017-02-10 Thread Marco Buttu

Marco Buttu added the comment:

> It may be worth to add a reference to FORMATTING from the
> format() docstring.

+1 :-)

--
nosy: +marco.buttu

___
Python tracker 

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



[issue29526] Documenting format() function

2017-02-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I think it would be worth to extend docstrings of __format__ methods of 
concrete types for including the description of type-specific format 
specifiers. But the docstring of format() shouldn't contain the description of 
format specifiers of all builtin types.

Detailed documentation of format specification mini-language with tables and 
examples you can get by requesting the help for FORMATTING. 
"help('FORMATTING')" or "pydoc3 FORMATTING". It may be worth to add a reference 
to FORMATTING from the format() docstring.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue29523] latest setuptools breaks virtualenvs due to unbundling dependencies

2017-02-10 Thread Jason R. Coombs

Jason R. Coombs added the comment:

Aah, yes. I see now. Ensure_pip uses _PROJECTS for three purposes: for defining 
additional_projects, extracting those packages to the tmpdir, and for declaring 
the installation of those projects. Only that last declaration is unnecessary.

This patch looks good to me.

--

___
Python tracker 

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



[issue29524] Move functions to call objects into a new Objects/call.c file

2017-02-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I like the idea of moving all code related to calling objects in one one file. 
But this has a drawback. This breaks a history. This makes harder code 
exploration and merging.

I would delay pushing this change until CPython repository be converted to Git. 
I heard Git better supports moving a code between files. And perhaps it might 
be easier to do this change by several commits -- separately moving a code from 
different files.

--

___
Python tracker 

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



Re: problem with Python 3.6 + PyX

2017-02-10 Thread Lele Gaifax
stalker5  writes:

> I'm have a problem with this little program
> ...
> raise child_exception_type(errno_num, err_msg)
> FileNotFoundError: [Errno 2] No such file or directory: 'tex'

PyX requires TeX to render textual glyphs into the image. Do you have it
installed? If so, is it "reachable" by your $PATH variable?

A quick test to re-render my PyX-based images with Python 3.6 didn't reveal
any problem...

ciao, lele.
-- 
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
l...@metapensiero.it  | -- Fortunato Depero, 1929.

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


[issue29526] Documenting format() function

2017-02-10 Thread R. David Murray

R. David Murray added the comment:

Thanks for wanting to help improve python.

I'm not entirely clear on what you are proposing.  I *think* you want to add 
something to the 'format' docstring?  As Eric mentioned the 'mini language' 
depends on the datatype, so it is going to be hard to cram accurate information 
into a docstring, where the full context of the documentation explanation of 
how format interacts with data types is missing.  We try to keep docstrings as 
short reminders.  In that regard, the format docstring *is* perhaps a bit 
lacking :)  A reminder of the BNF of the minilanguage would also be helpful if 
we could cram that in somehow.  It may just be too complex a topic for a 
docstring, though.

I'm also not clear why you are referring to strftime and numbers in the same 
sentence.  strftime is for date formatting.  I certainly don't think it is 
appropriate to try to jam that complex subtopic into the format docstring :)  
Maybe you meant 'printf', which % formatting followed fairly closely?

--
nosy: +r.david.murray

___
Python tracker 

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



[issue29523] latest setuptools breaks virtualenvs due to unbundling dependencies

2017-02-10 Thread Charalampos Stratakis

Charalampos Stratakis added the comment:

@jason.coombs

Already tried to just bump the setuptools version and bundle the other wheels 
but the result is still the same

--

___
Python tracker 

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



[issue29526] Documenting format() function

2017-02-10 Thread Eric V. Smith

Eric V. Smith added the comment:

Since these codes don't apply to all types, you'll need some words saying what 
they do apply to. For example, None being the same as "g" is true for int, 
float, and Decimal; but None is "s" for strings.

And, for example, none of the listed codes apply to datetime's.

I'm +0 on this if we can get the wording right.

--
nosy: +eric.smith
versions:  -Python 3.3, Python 3.4

___
Python tracker 

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



[issue29515] socket module missing IPPROTO_IPV6, IPPROTO_IPV4 on Windows

2017-02-10 Thread Steve Dower

Steve Dower added the comment:

We may just want to copy the values from the enum if there are different 
versions when they were introduced. But if that's not a problem, adding the 
MS_WINDOWS check is better than defining new macros.

--

___
Python tracker 

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



[issue29525] Python 2.7.13 for Windows broken (from prompt)

2017-02-10 Thread Steve Dower

Steve Dower added the comment:

Readline is also a common culprit when it's crashing out at the interactive 
prompt. Try either uninstalling or upgrading any packages that may include a 
readline module.

--

___
Python tracker 

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



[issue29523] latest setuptools breaks virtualenvs due to unbundling dependencies

2017-02-10 Thread Donald Stufft

Donald Stufft added the comment:

I haven't updated the bundled copy of ensurepip yet because of this. Most 
likely the way this will get resolved is that the PEP 518 PR will land in pip 
and we will no longer require setuptools to be pre-installed at all and 
ensurepip will go to only bundling pip itself.

--

___
Python tracker 

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



problem with Python 3.6 + PyX

2017-02-10 Thread stalker5

Hello everybody !

I'm have a problem with this little program

#---début---
from pyx import *

g = graph.graphxy(width=8, x=graph.axis.linear(min=-15, max=15))
g.plot(graph.data.function("y(x)=sin(x)/x"))
g.writeEPSfile("function")
g.writePDFfile("function")
g.writeSVGfile("function")
#--- fin---

Python protest :

--begin error message

Running script: "/Users/draper/Documents/2016-2017/PYTHON/pyx test.py"
Traceback (most recent call last):
  File "/Users/draper/Documents/2016-2017/PYTHON/pyx test.py", line 5, 
in 

g.writeEPSfile("function")
  File "/usr/local/lib/python3.6/site-packages/pyx/canvas.py", line 50, 
in wrappedindocument

return method(d, file, **write_kwargs)
  File "/usr/local/lib/python3.6/site-packages/pyx/document.py", line 
185, in writeEPSfile

pswriter.EPSwriter(self, f, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/pyx/pswriter.py", line 
142, in __init__

page.processPS(pagefile, self, acontext, registry, pagebbox)
  File "/usr/local/lib/python3.6/site-packages/pyx/document.py", line 
132, in processPS

self._process("processPS", *args)
  File "/usr/local/lib/python3.6/site-packages/pyx/document.py", line 
78, in _process

bbox.set(self.canvas.bbox()) # this bbox is not accurate
  File "/usr/local/lib/python3.6/site-packages/pyx/graph/graph.py", 
line 181, in bbox

self.finish()
  File "/usr/local/lib/python3.6/site-packages/pyx/graph/graph.py", 
line 303, in finish

self.doaxes()
  File "/usr/local/lib/python3.6/site-packages/pyx/graph/graph.py", 
line 580, in doaxes

self.dolayout()
  File "/usr/local/lib/python3.6/site-packages/pyx/graph/graph.py", 
line 564, in dolayout

self.doaxiscreate(axisname)
  File "/usr/local/lib/python3.6/site-packages/pyx/graph/graph.py", 
line 240, in doaxiscreate

self.axes[axisname].create()
  File "/usr/local/lib/python3.6/site-packages/pyx/graph/axis/axis.py", 
line 591, in create
self.canvas = self.axis.create(self.data, self.positioner, 
self.graphtexrunner, self.errorname)
  File "/usr/local/lib/python3.6/site-packages/pyx/graph/axis/axis.py", 
line 250, in create
return _regularaxis._create(self, data, positioner, graphtexrunner, 
self.parter, self.rater, errorname)
  File "/usr/local/lib/python3.6/site-packages/pyx/graph/axis/axis.py", 
line 220, in _create

variants[0].storedcanvas = layout(variants[0])
  File "/usr/local/lib/python3.6/site-packages/pyx/graph/axis/axis.py", 
line 141, in layout

self.painter.paint(canvas, data, self, positioner)
  File 
"/usr/local/lib/python3.6/site-packages/pyx/graph/axis/painter.py", line 
192, in paint
t.temp_labelbox = canvas.texrunner.text_pt(t.temp_x_pt, 
t.temp_y_pt, t.label, labelattrs)
  File "/usr/local/lib/python3.6/site-packages/pyx/text.py", line 1428, 
in wrapped

return f(self, *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/pyx/text.py", line 1459, 
in text_pt

return self.instance.text_pt(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/pyx/text.py", line 1278, 
in text_pt
left_pt, right_pt, height_pt, depth_pt = self.do_typeset(expr, 
self.texmessages_run_default + self.texmessages_run + texmessages)
  File "/usr/local/lib/python3.6/site-packages/pyx/text.py", line 1201, 
in do_typeset

self.do_start()
  File "/usr/local/lib/python3.6/site-packages/pyx/text.py", line 1344, 
in do_start

super().do_start()
  File "/usr/local/lib/python3.6/site-packages/pyx/text.py", line 1156, 
in do_start
self.popen = config.Popen(cmd, stdin=config.PIPE, 
stdout=config.PIPE, stderr=config.STDOUT, bufsize=0)
  File "/usr/local/lib/python3.6/site-packages/pyx/config.py", line 
190, in Popen

return subprocess.Popen(cmd, *args, **kwargs)
  File 
"/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", 
line 707, in __init__

restore_signals, start_new_session)
  File 
"/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", 
line 1326, in _execute_child

raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'tex'

-- end eroor message --

I search some solution, but without success.
Anybody have a idea ??

Thx a lot. Have a nice day.

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


[issue29526] Documenting format() function

2017-02-10 Thread Hugo Prod'homme

New submission from Hugo Prod'homme:

Hello python contributors,
this is my first time on python.org and I am coming with a suggestion.

The idea is to help people that have to format strings containing numbers of 
various kinds, I am from the scientific domain but this should help everybody 
anyway.

In the past the strftime was the best way to format numbers in strings 
(truncating to some digits after point, setting to exponent notation, etc...). 
To remind the "strf language" one had to use the internet or a document such as 
this page :
http://strftime.org/;>http://strftime.org/

Some idea was provided to add this indications in the python docs.
http://bugs.python.org/issue9650;>http://bugs.python.org/issue9650

Now the format() function has appeared in the python __builtins__ and this is 
even more adequate to add help about the string formatting, because we can 
write the "Format Specification Mini-Language" directly inside the docstring of 
the format.__doc__ . See the paragraph named "7.1.3.1. Format Specification 
Mini-Language" in the following page :
https://docs.python.org/2/library/string.html;>https://docs.python.org/2/library/string.html

I emphasize, the interest of this is to allow the user to be reminded of the 
formatting options without opening another document than his(her) script, to 
avoid breaking the workflow.

I am providing what I think is the minimal material that the docstring should 
contains within the attached file. I am not really familiar with docstring 
formatting according to PEP (436?) and someone should help getting this in the 
right way of writing. Furthermore, a specific syntax  is needed within the 
string in addition to the format() arguments, this should be described. And the 
reminder about the mini-language should appear clearly as a reminder. These are 
two supplemental difficulties in comparison with an usual docstring.

To anyone thinking something else should be added to the docstring; please add 
or say it.

PS: I think I can start from the matplotlib.pyplot.plot.__doc__ as a template 
to complete the format.__doc__ but I have some work aside for now.

--
files: format_docstring_v0.1.txt
messages: 287539
nosy: hugo.prodho...@gmx.fr
priority: normal
severity: normal
status: open
title: Documenting format() function
type: enhancement
versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7
Added file: http://bugs.python.org/file46625/format_docstring_v0.1.txt

___
Python tracker 

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



[issue20210] Provide configure options to enable/disable Python modules and extensions

2017-02-10 Thread Matthias Klose

Matthias Klose added the comment:

I don't see the point of having an option to do that.  Will patches for third 
party projects be submitted as well, to not install the test suite? Or will pip 
gain such a feature?  Note that removing the test suite completely, you'll make 
the test suites of some third party packages useless in some cases (I had a few 
bug reports for the Ubuntu packaging when I removed the tests unconditionally), 
but probably you don't care about these either.

--

___
Python tracker 

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



Re: Python Events in 2017, Need your help.

2017-02-10 Thread Stefan Behnel
Hi!

Germany has three major Python events planned this year:

- PyCon-Web in München (May 27-28th)
- Python-Camp in Köln (April 8-9th)
- PyCon-DE in Karlsruhe (October, dates TBA).

http://pyconweb.org/

https://python-verband.org/informieren/events/pythoncamp-2017

Stefan


Stephane Wirtel via PSF-Community schrieb am 09.01.2017 um 10:54:
> Dear Community,
> 
> For the PythonFOSDEM [1] on 4th and 5th February in Belgium, I would like
> to present some slides with the Python events around the World.  Based on
> https://python.org/events, I have noted that there are missing events, for
> example:
> 
> * PyCon Otto: Italy
> * PyCon UK: United Kingdom
> * PyCon CA: Canada
> * PyCon Ireland: Ireland
> * PyCon France: France
> 
> Some of these events are not yet announced and I understand they are in the
> second semester, and thus, they don't know the location and the dates,
> excepted for PyCon Otto (April).
> 
> In fact, I have noted that we know some big events in the Python community
> (for example: PyCon US and EuroPython) but do you know the others events,
> maybe the local event, PyCon IE, PyCon UK or PyCon IT.
> 
> I like to know where there is a PyCon or a Django Conf or a PyData Event.
> 
> In fact, I think we can help the Python Community if we submit all the
> events in https://python.org/events.
> 
> This page has been created by the PSF and is maintained by some volunteers.
> 
> I know this list of events:
> * PyCon Cameroon : 20-23 Jav, Cameroon
> * PythonFOSDEM : 4-5 Feb, Belgium
> * PyCon Colombia : 10-12 Feb, Colombia
> * PyCon Pune : 16-20 Feb, India
> * Swiss Python Summit : 17-18 Feb, Switzerland
> * IrPyCon : 17-18 Feb, Iran
> * PyCon SK : 10-13 Mar, Slovakia
> * Django Europe : 3-8 Apr, Italy
> * PyCon Otto : 6-9 Apr, Italy
> * Python Sudeste : 5-7 Mai, Brazil
> * GeoPython : 8-11 May, Switzerland
> * PyCon US : 17-26 May, USA
> * EuroPython : July, Italy
> * PyCon AU : 3-9 Aug, Australia
> * PyCon UK : September, United Kingdom
> * PyCon CA : November, Canada
> * PyCon Ireland : October, Ireland
> * PyCon FR : October/November, France
> 
> And you ?
> Please, could you check on https://www.python.org/events/ , if you are an
> organizer, please add your event.
> 
> If you think there is a missing event, please, send me the info via
> [email](mailto:steph...@wirtel.be) or via my [twitter
> account](https://twitter.com/matrixise) and I will add it on my slides.
> 
> I would like to present your event.
> 
> Thank you so much for your help.
> 
> Stephane Wirtel
> 
> [1] https://www.python-fosdem.org
> 


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


[issue29523] latest setuptools breaks virtualenvs due to unbundling dependencies

2017-02-10 Thread Jason R. Coombs

Jason R. Coombs added the comment:

For convenience, here's a link to the rendered changelog in the docs, which 
provides hyperlinks to the relevant issues [0].

[0] https://setuptools.readthedocs.io/en/latest/history.html#v34-0-0

--

___
Python tracker 

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



[issue29523] latest setuptools breaks virtualenvs due to unbundling dependencies

2017-02-10 Thread Jason R. Coombs

Jason R. Coombs added the comment:

This approach, bundling the necessary dependencies to install setuptools, seems 
like exactly the right thing to do, assuming that ensurepip should install 
setuptools at all, and I don't want to challenge that assumption here.

Looking at the patch and ensurepip, I wonder if the patch is necessary at all. 
It looks to me like the `find_links` declaration should be sufficient to allow 
a `pip install setuptools` to succeed and install its dependencies as long as 
they're bundled. @cstratak, can you test a less aggressive approach that merely 
bumps the dependency on setuptools and bundles the dependencies?

--

___
Python tracker 

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



[issue29525] Python 2.7.13 for Windows broken (from prompt)

2017-02-10 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue20210] Provide configure options to enable/disable Python modules and extensions

2017-02-10 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Victor, thanks for clarifying!  That eliminates my objection, if there's a 
tacit agreement that the functionality can be broken by mistake and it's the 
dedicated maintainer (Xavier or someone else)'s job to repair it :-)

--

___
Python tracker 

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



[issue29525] Python 2.7.13 for Windows broken (from prompt)

2017-02-10 Thread Tim Golden

Tim Golden added the comment:

Although I don't remember seeing a crash out as quick as this, common 
causes for this kind of thing are to do with environment variables 
pointing to still-existing or part-existing installations. Can you try:

set PY

from a command prompt, please, to see if any Python-related env vars are 
present. (Typically PYTHONHOME is the culprit)

--

___
Python tracker 

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



[issue29525] Python 2.7.13 for Windows broken (from prompt)

2017-02-10 Thread Frak N

New submission from Frak N:

I used to have an older version of python 2.7 that has worked for years. I just 
upgraded to 2.7.13 for Windows, 32 bit and now, I can't get the interpreter to 
run from the command line. It just returns to the DOS prompt.

c:\Python27>python
Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59) [MSC v.1500 32 bit 
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
c:\Python27>python

PC:
OS: Windows 7 - 64 bit (I am intentionally using the 32bit of python)
Processor: AMD PhenomII 975 Processor. 3.6GHz
RAM: 16GB

--
components: Windows
messages: 287532
nosy: Frak N, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Python 2.7.13 for Windows broken (from prompt)
type: crash
versions: Python 2.7

___
Python tracker 

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



[issue29465] Add _PyObject_FastCall() to reduce stack consumption

2017-02-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f23fa1f7b68f by Victor Stinner in branch 'default':
Issue #29465: Add Objects/call.c file
https://hg.python.org/cpython/rev/f23fa1f7b68f

--

___
Python tracker 

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



[issue3955] maybe doctest doesn't understand unicode_literals?

2017-02-10 Thread Matthis Thorade

Matthis Thorade added the comment:

I found this bug when trying to write a doctest that passes on Python 3.5 and 
Python 2.7.9.

The following adapted example passes on Python2, but fails on Python3:

# -*- coding: utf-8 -*-
from __future__ import unicode_literals
def f():
"""
>>> f()
u'xyz'
"""
return "xyz"

if __name__ == "__main__":
import doctest
doctest.testmod()

I think a nice solution could be to add a new directive so that I can use the 
following

def myUnic():
"""
This is a small demo that just returns a string.
>>> myUnic()
u'abc' # doctest: +ALLOW_UNICODE
"""
return 'abc'


I asked the same question here:
http://stackoverflow.com/questions/42158733/unicode-literals-and-doctest-in-python-2-7-and-python-3-5

--
nosy: +Matthis Thorade

___
Python tracker 

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



Repeating of posts

2017-02-10 Thread Cecil Westerhof
I see a lot of post delivered multiple times. Is that a problem at my
side, or are others experiencing this also?

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
-- 
https://mail.python.org/mailman/listinfo/python-list


Outthentic - full support for Python

2017-02-10 Thread melezhik
Hi!

Whether you are operations guy, devops or developer from time to time you deal 
with scripts development for various tasks - handy utilities, automation 
scripts, monitoring tools, so on.

Outthentic - is universal, language independent framework to encourage scripts 
development in easy and fun manner.

At version of 0.2.25 I have added full support for Python.

https://github.com/melezhik/outthentic

In case you need more information here is short introduction into it - 
"Outthentic – quick way to develop users scenarios" - 
https://sparrowdo.wordpress.com/2017/02/09/outthentic-quick-way-to-develop-user-scenarios/
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-10 Thread STINNER Victor

STINNER Victor added the comment:

> I'm willing Object/call.c solves such placement issue.

I also *hope* that a call.c file would *help* a little bit, but I'm not sure 
that it will fix *all* code placement issues.

I created the issue #29524 with a patch creating Objects/call.c.

--

___
Python tracker 

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



[issue29524] Move functions to call objects into a new Objects/call.c file

2017-02-10 Thread STINNER Victor

STINNER Victor added the comment:

See also issue #29502 "Should PyObject_Call() call the profiler on C functions, 
use C_TRACE() macro?": fixing this one should allow to remove fast-paths from 
ceval.c, since we now already have fast-paths in all "call" functions.

--

___
Python tracker 

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



  1   2   >