[issue30404] Make stdout and stderr truly unbuffered when using -u option

2017-10-11 Thread Berker Peksag

Change by Berker Peksag :


--
pull_requests: +3939

___
Python tracker 

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



[issue30767] logging must check exc_info correctly

2017-10-11 Thread Berker Peksag

Change by Berker Peksag :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue13802] IDLE font settings: use multiple character sets in examples

2017-10-11 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I decided to do the needed rearrangement of frames in this issue, leaving 
revision of widgets other than the sample to #24776.

PR3960 initially puts the following in the sample box.  I believe it should 
cover most Python users.


AaBbCcDdEeFfGgHhIiJj
1234567890#:+=(){}[]
¡¢£¥§©«®¶½ÀÁÂÃÄÅÇÐØß


ɐɕɘɞɟɤɫɮɰɷɻʁʃʆʎʞʢʫʭʯ
ΑαΒβΓγΔδΕεΖζΗηΘθΙιΚκ
БбДдЖжПпФфЧчЪъЭэѠѤѬӜ


אבגדהוזחטיךכלםמןנסעף
ابجدهوزحطي٠١٢٣٤٥٦٧٨٩


०१२३४५६७८९अआइईउऊएऐओऔ
कगङचजञतदनपबमयरलवशसह॥


〇一二三四五六七八九
汉字漢字人木火土金水
ᅡᅦᅩᆨᆫ가결걵곴극
あいうえおかさたなま

The new help message explains

Font sample: This shows what a selection of BMP unicode characters look
like for the current font selection.  If a font face does not define a
character, Tk attempts to find another font that does.  Substitute
glyphs will not necessarily have the same size as the font selected.
Hebrew and Arabic letters should display right to left, starting with
alef, \u05d0 and \u0627.  Arabic numerals display left to right.  The
East Asian samples are Chinese digits followed by Chinese Hanzi, Korean
Hangul, and Japanese Hiragana.

Except for Chinese, I intend for the samples to be meaningless subsequences of 
the respective character set.  I will try to get comments from others for the 
Indian, Korean, and Japanese samples.

The Chinese reads 'hanzi hanzi person wood fire earth metal water' with 'hanzi' 
repeated in simplified and traditional character variations.  Louie, could this 
be controversial in any way?

--
dependencies:  -IDLE: Improve config dialog font change user interface
title: IDLE Prefernces/Fonts: use multiple alphabets in examples -> IDLE font 
settings: use multiple character sets in examples

___
Python tracker 

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



[issue31741] backports import path can not be overridden in Windows (Linux works fine)

2017-10-11 Thread Zachary Ware

Zachary Ware  added the comment:

Note that your instructions start with downloading the installer for 2.7.0, 
whereas the latest version of 2.7 is 2.7.14, which includes pip.

backports is a strange beast of a package, which tries to emulate Python 3's 
namespace packages in Python 2.  To do so, backports.__init__ must have a very 
specific incantation, which yours is lacking (it only contains "from __future__ 
import absolute_import").  See https://pypi.org/project/backports/ for more 
details.

--
resolution: third party -> not a bug
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



[issue13802] IDLE Prefernces/Fonts: use multiple alphabets in examples

2017-10-11 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
pull_requests: +3937
stage: needs patch -> patch review

___
Python tracker 

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



[issue31769] configure includes user CFLAGS when detecting pthreads support

2017-10-11 Thread Mike Gilbert

Change by Mike Gilbert :


--
title: configure includes user CFLAGS testing detecting pthreads support -> 
configure includes user CFLAGS when detecting pthreads support

___
Python tracker 

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



[issue31558] gc.freeze() - an API to mark objects as uncollectable

2017-10-11 Thread INADA Naoki

INADA Naoki  added the comment:

> So my understand is that gc frees some objects and makes some memory pages 
> becomes available to allocate in child process. Allocation on the shared 
> memory pages will cause the copy-on-write even without gc.
>
> Though this behavior may have better name?

OK, now I got what you're talking.
I don't know proper name about it.  I call it as "memory hole" for now.

But I don't think "memory hole" is big problem, because we already has refcount.
Say there are 100 function objects in one page, and 99 of them are never used. 
But when 1 of them are called, the page is unshared.

Solving memory hole issue is easy: just stop allocating new object from 
existing pages.
But I don't think it's worth enough because of refcount issue.

Instead of trying "share most data", I recommend to "use small number of 
processes" approach.

In my company, we don't use "prefork", but "--lazy-app" option of uWSGI for 
graceful reloading. (e.g. "afterfork")
But since we use nginx in front of uWSGI, # of uWSGI worker is just 2* CPU 
cores.  We can serve to massive clients from only 16~32 processes.

So I prefer optimizing normal memory usage.  It is good for all applications, 
not only "prefork" applications.

In this case, I'm +1 to gc.freeze() proposal because it can be used for single 
process applications.

--

___
Python tracker 

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



[issue31769] configure includes user CFLAGS testing detecting pthreads support

2017-10-11 Thread Arfrever Frehtes Taifersar Arahesis

Change by Arfrever Frehtes Taifersar Arahesis :


--
assignee:  -> twouters
nosy: +twouters

___
Python tracker 

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



[issue31769] configure includes user CFLAGS testing detecting pthreads support

2017-10-11 Thread Arfrever Frehtes Taifersar Arahesis

Change by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue31768] argparse drops '|'s when the arguments are too long

2017-10-11 Thread Louie Lu

Louie Lu  added the comment:

the format of usage is do at argparse.py:296.

So how do we format this kind of situation,
to be like this, if the group also too long?

  usage: test.py [-h]
 [-v | -q | -x [X] | -y [Y] | Z | Z | Z | Z | Z |
  Z | Z | Z]


Also, another bug I think is, given two mutul group,
it will not show out the correct grouping:

usage: test.py [-h] [-v] [-e] [Z] [G] [Z] [G]

positional arguments:
  Z  the exponent
  G  the exponent
  Z  the exponent
  G  the exponent

optional arguments:
  -h, --help show this help message and exit
  -v, --verbose
  -e, --ee


--- 2 mutul group ---

import sys
import argparse
parser = argparse.ArgumentParser()
group = parser.add_mutually_exclusive_group()
group.add_argument("-v", "--verbose", action="store_true")
g2 = parser.add_mutually_exclusive_group()
g2.add_argument("-e", "--eplog", action="store_true")
g2.add_argument("-g", "--quiet", action="store_true")

for i in range(int(sys.argv[1])):
group.add_argument("z", metavar='Z', type=str, help="the exponent", 
nargs='?')
g2.add_argument("z", metavar='Z', type=str, help="the exponent", nargs='?')

parser.parse_args(['-h'])

--
nosy: +louielu

___
Python tracker 

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



[issue31769] configure includes user CFLAGS testing detecting pthreads support

2017-10-11 Thread Mike Gilbert

Mike Gilbert  added the comment:

To resolve this, I suggest clearing CFLAGS/CXXFLAGS before performing the 
ptheads check, and restoring them afterward.

--

___
Python tracker 

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



[issue31769] configure includes user CFLAGS testing detecting pthreads support

2017-10-11 Thread Mike Gilbert

Change by Mike Gilbert :


Added file: https://bugs.python.org/file47215/configure.log

___
Python tracker 

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



[issue31769] configure includes user CFLAGS testing detecting pthreads support

2017-10-11 Thread Mike Gilbert

Change by Mike Gilbert :


Added file: https://bugs.python.org/file47216/build.log

___
Python tracker 

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



[issue31769] configure includes user CFLAGS testing detecting pthreads support

2017-10-11 Thread Mike Gilbert

New submission from Mike Gilbert :

When testing for ptheads support in the compiler, configure includes the CFLAGS 
value from the environment.

If CFLAGS contains -pthread, or an option which implies -pthread (like 
-fopenmp), this will cause configure to not include -pthread in the CC 
variable, and -pthread will not be passed to the linker.

This ultimately leads to a link failure when building with glibc/gcc.

gcc   -Xlinker -export-dynamic -o python Programs/python.o libpython3.7m.a -ldl 
 -lutil   -lm  
libpython3.7m.a(thread.o): In function `PyThread_start_new_thread':
/home/floppym/src/cpython/Python/thread_pthread.h:191: undefined reference to 
`pthread_attr_setstacksize'

--
components: Build
messages: 304200
nosy: floppymaster
priority: normal
severity: normal
status: open
title: configure includes user CFLAGS testing detecting pthreads support
type: compile error
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue14369] make __closure__ writable

2017-10-11 Thread Nick Coghlan

Nick Coghlan  added the comment:

Thinking about the interaction between this idea and 
https://bugs.python.org/issue30744 made me realise that there's a subtlety here 
that would probably need to be spelled out more clearly in the docs for 
__closure__ than it is for __code__: any changes made to a function object 
(whether it's a synchronous function, a generator, or a coroutine) will only 
affect *future* function invocations, as execution frames capture references to 
both the code object and all the closure cells when they're created.

(Thought prompted by asking myself "What would happen to existing 
generator-iterators if you rebound the closure on the generator function?". The 
answer is "Nothing", but I figure if I had to think about it, that answer 
likely isn't going to be obvious to folks that are less familiar with how the 
eval loop works in practice)

--

___
Python tracker 

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



[issue31756] subprocess.run should alias universal_newlines to text

2017-10-11 Thread Nick Coghlan

Nick Coghlan  added the comment:

As far as docs phrasing goes, it probably makes sense to frame it as "text" 
being the preferred argument name in 3.7+, with "universal_newlines" retained 
indefinitely as a compatibility preserving alias. After all, if that wasn't our 
intention, we wouldn't be adding the more straightforward alias in the first 
place.

As a new Py3-only argument, "text" can also be made keyword-only. (The Popen 
arg list is so long that most folks treat everything other than the first item 
as keyword-only anyway, but it doesn't hurt to ask the interpreter to enforce 
that)

--

___
Python tracker 

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



[issue31759] re wont recover nor fail on runaway regular expression

2017-10-11 Thread Tim Peters

Tim Peters  added the comment:

Sure!  The OP was obviously asking about the engine that ships with Python, so 
that's what I talked about.

Raphaël, Matthew develops an excellent replacement ("regex") for Python's re 
module, which you can install via, e.g., "pip install regex" (or, on Windows, 
"python -m pip install regex").  More info here:

https://pypi.python.org/pypi/regex/

Matthew, will that become Python's standard offering some day?  I'd be in favor 
of that!  It has many advantages, although it doesn't always avoid 
exponential-time backtracking in failing cases.  For example, `re` and `regex` 
both take exponential time to fail to match the regexp:

"((xy)+)+$"

against strings of the form:

"xy" * i + "y"

Increase `i` by 1, and both take about twice as long to fail to match (meaning 
either .match or .search), and `re` is actually quicker on my box (3.6.3 on 
64-bit Win10).

In any case, I'm closing this, since there's no concrete idea on the table for 
a change to `re` that would actually help (e.g., people ignore warnings, and 
there's really no way to _guess_ whether a regexp is "taking too long" to begin 
with - if it's taking minutes, people immediately discover the hangup already 
when they interrupt the program and see that it's trying to match a regexp).

--
resolution:  -> wont fix
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



[issue31558] gc.freeze() - an API to mark objects as uncollectable

2017-10-11 Thread Zekun Li

Zekun Li  added the comment:

So what we did is:

We keep gc **disabled** on parent process and freeze after warmup, enable gc on 
child process.

The reason not to do a full collection is mentioned in previous 
comments/original ticket - (I called it) memory fragmentation.

The observation is - We keep gc disabled on both parent and child process and 
did a full collection before fork, it makes the shared memory shrink a lot 
compared to no collection. - There's no way for disabled gc to touch the head 
to make copy-on-write.

Of course, enable gc will make the shared memory shrink more. But the former 
case is accounting more than latter one.

So my understand is that gc frees some objects and makes some memory pages 
becomes available to allocate in child process. Allocation on the shared memory 
pages will cause the copy-on-write even without gc.

Though this behavior may have better name?

--

___
Python tracker 

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



[issue31567] Inconsistent documentation around decorators

2017-10-11 Thread Daisuke Miyakawa

Change by Daisuke Miyakawa :


--
keywords: +patch
pull_requests: +3935
stage:  -> patch review

___
Python tracker 

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



[issue2506] Add mechanism to disable optimizations

2017-10-11 Thread Alex Gaynor

Alex Gaynor  added the comment:

If anyone has needed a workaround in the past 9 years and hasn't yet found one: 
https://github.com/pyca/cryptography/pull/3968/commits/3b585f803891e750d0ca5861b5a29e16b779bc16

--
nosy: +alex

___
Python tracker 

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



[issue31558] gc.freeze() - an API to mark objects as uncollectable

2017-10-11 Thread INADA Naoki

INADA Naoki  added the comment:

Should gc.freeze() do gc.collect() right before freezing?
Or should we document `gc.collect(); gc.freeze();` idiom?

I don't like `gc.freeze(collect=False)`.
So if there is at least one use case of `gc.freeze()` without `gc.collect()`, 
I'm +1 on former (current pull request) design.


Other nitpicking: get_freeze_count() or get_frozen_count()?

--

___
Python tracker 

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



[issue31741] backports import path can not be overridden in Windows (Linux works fine)

2017-10-11 Thread Chris Caron

Chris Caron  added the comment:

Just to point out, i forgot the instructions of installing pip (right before) 
the following entry in my last post:
>> ** Heads up
>> So at this point, the C:\Python27\Lib\site-packages will contain the >>> 
>> following: pip, setuptools,  and wheel.

To be thorough, i should add that that i followed these instruction: 
https://pip.pypa.io/en/stable/installing/

Which required me to download get-pip.py from here 
https://bootstrap.pypa.io/get-pip.py and run it.  The rest of the instructions 
(after the **heads up) comment are still all on note.

--

___
Python tracker 

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



[issue31558] gc.freeze() - an API to mark objects as uncollectable

2017-10-11 Thread INADA Naoki

INADA Naoki  added the comment:

>> This is only useful if the parent process has a lot of memory that's never 
>> used by the child processes right? Otherwise, you would lose via refcounting 
>> COWs.
>
> What we saw in prod is that memory fragmentation caused by gc is the main 
> reason of shared memory shrink.
>
> The memory fragmentation is figured out by doing a full collection before 
> fork and keep it disabled, it'll make a bunch of copy-on-write in child 
> process.

GC doesn't cause "memory fragmentation".
GC touches (writes) GC header and refcount.  It cause sharing memory shrink.
Maybe, you're wrongly understanding "memory fragmentation".

> This can't solve the copy-on-write caused by ref count, but we're thinking 
> about freezing the ref count on those permanent objects too.

It may increase cost of refcount operation, because it makes all INCREF and 
DECREF bigger.
Note that this is only helps application using gc.freeze().  This shouldn't 
slow down all other applications.

> So this is useful if you did some warm-up work in parent process.

I don't understand this statement.

> Also it could speedup gc if you have large amount of permanent objects.

Yes, this helps not only "prefork" application, but also all long running 
applications
having large baseline data.

--

___
Python tracker 

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



[issue31558] gc.freeze() - an API to mark objects as uncollectable

2017-10-11 Thread INADA Naoki

INADA Naoki  added the comment:

As Instagram's report, disabling cycler GC really helps even if there is 
refcont.
All application have some cold data: imported but never used modules, functions.

--

___
Python tracker 

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



[issue31767] Windows Installer fails with error 0x80091007 when trying to install debugging symbols

2017-10-11 Thread Ned Deily

Change by Ned Deily :


--
components: +Windows -Installation
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue31757] Tutorial: Fibonacci numbers start with 1, 1

2017-10-11 Thread Steven D'Aprano

Change by Steven D'Aprano :


--
nosy: +steven.daprano

___
Python tracker 

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



[issue31741] backports import path can not be overridden in Windows (Linux works fine)

2017-10-11 Thread Chris Caron

Chris Caron  added the comment:

-- Download Instructions
* 64 Bit ver of Python v2.7 for Windows 
https://www.python.org/ftp/python/2.7/python-2.7.amd64.msi
* Microsoft Visual C++ Compiler for Python 2.7: 
https://www.microsoft.com/en-ca/download/details.aspx?id=44266. 

-- Installation Instructions
* Install Python v2.7 (run python-2.7.amd64.msi); choose default options. 
Note: In my case, i uninstalled my already installed version (for the purpose 
of this post) first and made sure to delete the C:\Python27 directory left 
behind). Then I reinstalled the package.
   Default Options:
  - Install for all users
  - Install location: C:\Python27\
  - All packages installed (5 of 5 subfeatures)
  
** Heads up
So at this point, the C:\Python27\Lib\site-packages will contain the following: 
pip, setuptools,  and wheel.

-- A Starting Point
* Download the Python.Test.zip file i attached, but since you made it clear you 
want everything to be present in this message, i'll do my best to try to 
document it and paste content here: 
It's main contents is just to provide an alternative include directory called 
Test. In this test directory i provide six.py, odereddict, chardet, backports, 
socks and sockhandler.
> dir listing of Test
10/11/2017  06:04 PM  .
10/11/2017  06:04 PM  ..
10/11/2017  06:04 PM  backports
10/11/2017  06:04 PM  chardet
10/11/2017  06:04 PM 4,221 ordereddict.py
10/11/2017  06:04 PM 4,916 ordereddict.pyc
10/11/2017  06:04 PM23,462 six.py
10/11/2017  06:04 PM23,754 six.pyc
10/11/2017  06:04 PM32,006 socks.py
10/11/2017  06:04 PM 2,913 sockshandler.py
10/11/2017  06:04 PM 0 __init__.py
   7 File(s) 91,272 bytes
> End DIR Listing

Now lets introduce the second part of the zip file i provided. Test.py.  It's 
sitting next to (not in) the Test directory i listed above. It looks like this
> Test.py
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
import sys
from os.path import join
from os.path import abspath
from os.path import dirname

print('Path Before Change: {0}'.format('\n'.join(sys.path)))
sys.path.insert(0, join(dirname(abspath(__file__)), 'Test'))
print('Path After Change: {0}'.format('\n'.join(sys.path)))

import backports
print('Backports Path: {0}'.format(backports.__path__))

import chardet
print('chardet Path: {0}'.format(chardet.__path__))

import six
print('six Path: {0}'.format(six.__file__))
> end Test.py

Those who already downloaded Test.py will notice i stripped out all of the 
comments.  Bear with me here, the actual code lines are still all unchanged.
I also placed the attached zip file into my root C:\ directory.  Not ideal for 
obvious reasons, but for this test, it makes the output small and easy to 
follow.

-- Script Run # 1
When i run the above script... right now... i get:
>
C:\Python.Test>python Test.py
Path Before Change: C:\Python.Test
C:\windows\system32\python27.zip
C:\Python27\DLLs
C:\Python27\lib
C:\Python27\lib\plat-win
C:\Python27\lib\lib-tk
C:\Python27
C:\Python27\lib\site-packages
Path Before Change: C:\Python.Test\Test
C:\Python.Test
C:\windows\system32\python27.zip
C:\Python27\DLLs
C:\Python27\lib
C:\Python27\lib\plat-win
C:\Python27\lib\lib-tk
C:\Python27
C:\Python27\lib\site-packages
Backports Path: ['C:\\Python.Test\\Test\\backports']
chardet Path: ['C:\\Python.Test\\Test\\chardet']
six Path: C:\Python.Test\Test\six.pyc
>

Like you said... everything is fine; it's not a python issue... but hang on...

Let's use pip and install some simple packages...
>
C:\Python.Test>pip install pylint
... lots of content flies by; but it's successful
>

Let's run our script again (same one... same content). If you're doing this 
from the command line, then cut and paste:
>
C:\Python.Test>python Test.py
Path Before Change: C:\Python.Test
C:\windows\system32\python27.zip
C:\Python27\DLLs
C:\Python27\lib
C:\Python27\lib\plat-win
C:\Python27\lib\lib-tk
C:\Python27
C:\Python27\lib\site-packages
Path Before Change: C:\Python.Test\Test
C:\Python.Test
C:\windows\system32\python27.zip
C:\Python27\DLLs
C:\Python27\lib
C:\Python27\lib\plat-win
C:\Python27\lib\lib-tk
C:\Python27
C:\Python27\lib\site-packages
Backports Path: ['C:\\Python27\\lib\\site-packages\\backports']
chardet Path: ['C:\\Python.Test\\Test\\chardet']
six Path: C:\Python.Test\Test\six.pyc
>

So... what should you take from this?
- backports is no longer referencing the one the PYTHONPATH (well 
sys.path.insert()) suggested otherwise.
- but we know it works because the other entries were loaded okay. We can see 
this from the 'six' and 'chardet' inport paths.

Here is where it gets really weird...
Lets install chardet:
>
C:\Python.Test>pip install chardet
... lots of content flies by; but it's successful
>

Now lets run our Test.py again:
>
C:\Python.Test>python Test.py

[issue31768] argparse drops '|'s when the arguments are too long

2017-10-11 Thread Eric V. Smith

Eric V. Smith  added the comment:

Good point.

--

___
Python tracker 

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



[issue31768] argparse drops '|'s when the arguments are too long

2017-10-11 Thread caveman

caveman  added the comment:

When | is dropped, it means that the arguments/options are no longer mutually 
exclusive, which renders the resultant help menu incorrect.

--

___
Python tracker 

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



[issue31768] argparse drops '|'s when the arguments are too long

2017-10-11 Thread Eric V. Smith

Eric V. Smith  added the comment:

Removing versions 3.4 and 3.8.

Attaching a reproducing script.  Run it with a parameter of the number of 
arguments to add. The behavior changes between 7 and 8, although I'm not sure 
either is wrong, just different. This is from Windows:

% python3 31768.py 7
usage: 31768.py [-h] [-v | -q | -x [X] | -y [Y] | Z | Z | Z | Z | Z | Z | Z]

positional arguments:
  Z  the exponent
  Z  the exponent
  Z  the exponent
  Z  the exponent
  Z  the exponent
  Z  the exponent
  Z  the exponent

optional arguments:
  -h, --help show this help message and exit
  -v, --verbose
  -q, --quiet
  -x [X] the base
  -y [Y] the exponent

% python3 31768.py 8
usage: 31768.py [-h] [-v] [-q] [-x [X]] [-y [Y]]
[Z] [Z] [Z] [Z] [Z] [Z] [Z] [Z]

positional arguments:
  Z  the exponent
  Z  the exponent
  Z  the exponent
  Z  the exponent
  Z  the exponent
  Z  the exponent
  Z  the exponent
  Z  the exponent

optional arguments:
  -h, --help show this help message and exit
  -v, --verbose
  -q, --quiet
  -x [X] the base
  -y [Y] the exponent

--
nosy: +eric.smith
versions:  -Python 3.4, Python 3.8
Added file: https://bugs.python.org/file47214/31768.py

___
Python tracker 

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



[issue31768] argparse drops '|'s when the arguments are too long

2017-10-11 Thread caveman

caveman  added the comment:

forgot to add: when you execute the code, pass the argument '-h' in order to 
have the script generate the help menu text.

--

___
Python tracker 

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



[issue31766] Python 3.5 missing from documentation

2017-10-11 Thread Ned Deily

Ned Deily  added the comment:

The documentation for 3.5 was deliberated removed from the pull down lists of 
current docsets as 3.5 is now in security-fix-only mode; the 3.5 documentation 
is only updated when a new security release is made and general doc changes to 
it are no longer made.  You can find a link to the docsets for 3.5.x and all 
Python releases on the Python Documentation By Version page 
(https://www.python.org/doc/versions/) which is linked to from a number of 
places, including the index page of the current and past Python versions 
docsets (e.g. https://docs.python.org/3/) and from the main python.org doc page 
(https://www.python.org/doc/).

--
nosy: +larry, ned.deily
resolution:  -> not a bug
status: open -> pending

___
Python tracker 

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



[issue31768] argparse drops '|'s when the arguments are too long

2017-10-11 Thread caveman

New submission from caveman :

if you execute the code below, mutually exclusive agrs are separated by '|' as 
expected. but if you uncomment the 1 line down there, then the args list will 
be too long, and as argparse tries to wrap the args around, it drops all '|'s 
which semantically destroys the intended syntax of the arguments.

import argparse

parser = argparse.ArgumentParser()
group = parser.add_mutually_exclusive_group()
group.add_argument("-v", "--verbose", action="store_true")
group.add_argument("-q", "--quiet", action="store_true")
group.add_argument("-x", metavar='X', type=str, help="the base", nargs='?')
group.add_argument("-y", metavar='Y', type=str, help="the exponent", nargs='?')
group.add_argument("z", metavar='Z', type=str, help="the exponent", nargs='?')
group.add_argument("z", metavar='Z', type=str, help="the exponent", nargs='?')
group.add_argument("z", metavar='Z', type=str, help="the exponent", nargs='?')
group.add_argument("z", metavar='Z', type=str, help="the exponent", nargs='?')
group.add_argument("z", metavar='Z', type=str, help="the exponent", nargs='?')
group.add_argument("z", metavar='Z', type=str, help="the exponent", nargs='?')
group.add_argument("z", metavar='Z', type=str, help="the exponent", nargs='?')
#group.add_argument("z", metavar='Z', type=str, help="the exponent", nargs='?')

args = parser.parse_args()

--
components: Library (Lib)
messages: 304184
nosy: caveman
priority: normal
severity: normal
status: open
title: argparse drops '|'s when the arguments are too long
type: behavior
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue30744] Local variable assignment is broken when combined with threads + tracing + closures

2017-10-11 Thread Guido van Rossum

Change by Guido van Rossum :


--
nosy: +gvanrossum

___
Python tracker 

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



[issue31759] re wont recover nor fail on runaway regular expression

2017-10-11 Thread Matthew Barnett

Matthew Barnett  added the comment:

You shouldn't assume that just because it takes a long time on one 
implementation that it'll take a long time on all of the others, because it's 
sometimes possible to include additional checks to reduce the problem. (I doubt 
you could eliminate the problem entirely, however.)

My regex module, for example, includes some additional checks, and it seems to 
be OK with these tests.

--

___
Python tracker 

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



[issue31767] Windows Installer fails with error 0x80091007 when trying to install debugging symbols

2017-10-11 Thread Igor Skochinsky

New submission from Igor Skochinsky :

Trying to install 3.6.3 on Windows 10 and getting this error.

Repro steps:

1. Download python-3.6.3.exe or python-3.6.3-amd64.exe, run it
2. Select "Customize Installation"
3. Next
4. In Advanced Options, select 
[x] Install for all users (not sure if important)
[x] Download debugging symbols
change path to F:\Python36 (not sure if it matters but my system drive is F: 
and C: is missing except for when I plug in a USB drive)
Ucheck
[ ] Associate files with Python
Click Install and accept elevation prompt. After a while it fails with 

Error 0x80091007 - Hash value not correct.

Interestingly, "log file" link does not work. I had to go hunt for the log in 
%temp% myself. The relevant parts:

Error 0x80091007: Hash mismatch for path: F:\ProgramData\Package 
Cache\.unverified\core_AllUsers_pdb, expected: 
A4B6E4A818E49F000513774F034EC98A194E3C3D, actual: 
36C7B852E586D26F4D239ED72EFE5FFBEBA21825
Error 0x80091007: Failed to verify hash of payload: core_AllUsers_pdb
Failed to verify payload: core_AllUsers_pdb at path: F:\ProgramData\Package 
Cache\.unverified\core_AllUsers_pdb, error: 0x80091007. Deleting file.
Application requested retry of payload: core_AllUsers_pdb, encountered error: 
0x80091007. Retrying...

There are a few more retries basically with the same result. However, this one 
is interesting:

Acquiring package: core_AllUsers_pdb, payload: core_AllUsers_pdb, copy from: 
F:\Users\Igor\Downloads\core_pdb.msi

I don't have such a file there, just the installer .exe

--
components: Installation
messages: 304182
nosy: Igor.Skochinsky
priority: normal
severity: normal
status: open
title: Windows Installer fails with error 0x80091007 when trying to install 
debugging symbols
type: security
versions: Python 3.6

___
Python tracker 

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



[issue31766] Python 3.5 missing from documentation

2017-10-11 Thread Anthony Flury

New submission from Anthony Flury :

In the Python version pull down list on docs.python.org, Python3.5 used to be 
listed, but has now been removed; the list only contains 2.7, 3.6 & 3.7.

Python 3.5 is still the official Python 3.5 release in the Ubuntu repository, 
and still a supported release in other parts of python.org, so to see it 
disappearing from the drop-down was surprising.

To note - if you pick a particular page - say : 

https://docs.python.org/3/tutorial/index.html

and change the url to : 

https://docs.python.org/3.5/tutorial/index.html

The pull down now does contain 3.5 (along side 2.7, 3.63 & 3.7)

--
assignee: docs@python
components: Documentation
messages: 304181
nosy: anthony-flury, docs@python
priority: normal
severity: normal
status: open
title: Python 3.5 missing from documentation
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



[issue31749] Request: Human readable byte amounts in the standard library

2017-10-11 Thread Jason Stelzer

Jason Stelzer  added the comment:

I often speak in generalizations and half thoughts. Feel free to cherry pick as 
much or a little as you want.

Including a core shim of whatever is agreed to be the minimalist functionality 
with a SEE ALSO note or clue as to where to start would:

* Resolve the basic out-of-the-box stuff.

* Eliminate a lot of boring DIY stuff for people who reach for an editor first 
and search second.

* Give new users much firmer footing.

* Give some everything and the kitchen sink projects wider exposure.

--

___
Python tracker 

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



[issue31749] Request: Human readable byte amounts in the standard library

2017-10-11 Thread Rich

Rich  added the comment:

I think bitmath would be overkill to include in its entirety, but maybe there 
solution is a good one.

There is also:

https://pypi.python.org/pypi/byteformat/
https://pypi.python.org/pypi/datasize
https://pypi.python.org/pypi/hurry.filesize
https://pypi.python.org/pypi/hfilesize/
https://humanfriendly.readthedocs.io/en/latest/
https://pypi.python.org/pypi/humanize

and a bajillion other solutions here: 
https://stackoverflow.com/questions/1094841/reusable-library-to-get-human-readable-version-of-file-size
 and elsewhere - I think really the underscoring how common this problem is.

(Although I don't _particularly want_ this to expand beyond the scope of this 
single function, it does seem that given the amount of "Python for Humans" 
stuff out there, there could be an argument made for adding a "humanize" 
package into the standard library..)

--

___
Python tracker 

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



[issue31749] Request: Human readable byte amounts in the standard library

2017-10-11 Thread Jason Stelzer

Jason Stelzer  added the comment:

Just pointing out that this exists and seems active.

https://github.com/tbielawa/bitmath

Perhaps include some or all of it in core python? Crazier things have happened.

--
nosy: +Jason Stelzer

___
Python tracker 

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



[issue31759] re wont recover nor fail on runaway regular expression

2017-10-11 Thread Raphaël Riel

Raphaël Riel  added the comment:

Thanks Tim! Pretty nice answer that I can learn from! Thanks for your time.

I definitely knew my Regex was broken, yet I was surprised the 
interpreter/library didn't gave up/error after some(several million) steps.

Some other language seems to just assume there will be no match (Source: some 
play on https://regex101.com/), and I don't think this is a valid approach.

Should there be a WARNing logged on a defined soft-limit?

I know this is low-level "re" library, and your point is pretty valid about the 
fact the lib should be doing what it's told to do. 
I was mostly looking for opinion about WARNs on soft limits and maybe errors on 
a hard-limit to debug/avoid this kind of false-hang situation.

Feel free to close/wont-fix/not-a-bug this issue! And thanks again for your 
kind answer to my initial issue!

--

___
Python tracker 

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



[issue31764] sqlite3.Cursor.close() crashes in case the Cursor object is uninitialized

2017-10-11 Thread Oren Milman

Change by Oren Milman :


--
keywords: +patch
pull_requests: +3934
stage:  -> patch review

___
Python tracker 

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



[issue31558] gc.freeze() - an API to mark objects as uncollectable

2017-10-11 Thread Zekun Li

Zekun Li  added the comment:

> This is only useful if the parent process has a lot of memory that's never 
> used by the child processes right? Otherwise, you would lose via refcounting 
> COWs.

What we saw in prod is that memory fragmentation caused by gc is the main 
reason of shared memory shrink.

The memory fragmentation is figured out by doing a full collection before fork 
and keep it disabled, it'll make a bunch of copy-on-write in child process.

This can't solve the copy-on-write caused by ref count, but we're thinking 
about freezing the ref count on those permanent objects too.

So this is useful if you did some warm-up work in parent process.

Also it could speedup gc if you have large amount of permanent objects.

--
nosy: +brainfvck

___
Python tracker 

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



[issue31765] BUG: System deadlocks performing big loop operations in python 3.5.4, windows 10

2017-10-11 Thread R. David Murray

R. David Murray  added the comment:

Most likely an error in your program logic, I'm afraid.  This isn't a forum for 
getting help, you should try the python-list mailing list.  (If you do find a 
bug, you can then open an issue with details.)

--
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



[issue31757] Tutorial: Fibonacci numbers start with 1, 1

2017-10-11 Thread Mark Dickinson

Mark Dickinson  added the comment:

I agree it would be good to be consistent.

--

___
Python tracker 

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



[issue31765] BUG: System deadlocks performing big loop operations in python 3.5.4, windows 10

2017-10-11 Thread Nikhil

New submission from Nikhil :

What I did
1) root file declared where operation will start and import hashlib for
getting hash signatures
2) os.walk for recursively diving into directory tree
3) open file and find sha256 digest and print it
4) close the file
5) recursively repeat all above 2 steps till we traversed directory tree

Above logic python program caused sudden exponential increase in RAM usage
(task manager by chance)  and certainly DEADLOCK and..  Force shutdown

I want to know what went wrong.

--
messages: 304173
nosy: Nik101
priority: normal
severity: normal
status: open
title: BUG: System deadlocks performing big loop operations in python 3.5.4, 
windows 10

___
Python tracker 

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



[issue30767] logging must check exc_info correctly

2017-10-11 Thread Matthew Patton

Change by Matthew Patton :


--
nosy: +mp5023

___
Python tracker 

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



[issue31764] sqlite3.Cursor.close() crashes in case the Cursor object is uninitialized

2017-10-11 Thread Oren Milman

New submission from Oren Milman :

The following code causes a crash:
import sqlite3
cursor = sqlite3.Cursor.__new__(sqlite3.Cursor)
cursor.close()

this is because pysqlite_cursor_close() (in Modules/_sqlite/cursor.c) assumes
that `self->connection` is not NULL, and passes it to pysqlite_check_thread(),
which crashes.


I would open a PR to fix this soon.

--
components: Extension Modules
messages: 304172
nosy: Oren Milman
priority: normal
severity: normal
status: open
title: sqlite3.Cursor.close() crashes in case the Cursor object is uninitialized
type: crash
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



[issue30767] logging must check exc_info correctly

2017-10-11 Thread Matthew Patton

Change by Matthew Patton :


--
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



[issue31763] Add NOTICE level to the logging module

2017-10-11 Thread Matthew Patton

Change by Matthew Patton :


--
keywords: +patch
pull_requests: +3932
stage:  -> patch review

___
Python tracker 

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



[issue31763] Add NOTICE level to the logging module

2017-10-11 Thread R. David Murray

R. David Murray  added the comment:

I fixed the title for you, otherwise this looks like a duplicate of issue 31732.

--
nosy: +r.david.murray
title: Add TRACE level to the logging module -> Add NOTICE level to the logging 
module

___
Python tracker 

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



[issue31762] Issue in login

2017-10-11 Thread R. David Murray

R. David Murray  added the comment:

This tracker is for reporting bugs in python.  If you want to report a problem 
with the tracker, please use the 'report tracker problem' link in the left 
column.  (That said, I thought the error message you show in the screenshot was 
fixed by the recent tracker upgrade, but then again the screenshot doesn't look 
like any image of the tracker I've ever seen.  So if you open a tracker error 
report please provide additional information about your environment and what 
actions will reproduce the error).

--
nosy: +r.david.murray
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



[issue31759] re wont recover nor fail on runaway regular expression

2017-10-11 Thread Tim Peters

Tim Peters  added the comment:

Well, the problem in the regexp is this part:  "\d+,? ?".  You're not 
_requiring_ that strings of digits be separated by a comma or blank, you're 
only _allowing_ them to be so separated.  A solid string of digits is matched 
by this, and so the enclosing + requires the engine, when backtracking, to 
consider every possible way of breaking the solid string of digits into one or 
more solid strings of digits too.  If there are n digits in the digit string, 
there are 2**(n-1) ways to do so.

Overall the regexp can never match because "NULL" never gets matched.  So all 
possibilities will be tried.  We can compute how many attempts will be made 
like so:

prod = 1
for c in re.findall("\d+|NULL", statement):
if c == "NULL":
break
prod *= 2**(len(c) - 1)
print(format(prod, ","))


Attempting test_01
256
Attempting test_02
4,096
Attempting test_03
65,536
Attempting test_04
1,048,576
Attempting test_05
2,097,152
Attempting test_06
4,194,304
Attempting test_07
8,388,608
Attempting test_08
16,777,216
Attempting test_09
33,554,432
Attempting test_10
67,108,864
Attempting test_11
16,777,216
Attempting test_12
536,870,912
Attempting test_13
17,179,869,184
Attempting test_14
549,755,813,888

Note, e.g., this "predicts" test_08 will take about the same time as test_11 
(both require 16,777,216 attempts).  Which is what you actually saw happen.

And that's why you gave up on test_14:  it will require over half a trillion 
failing attempts before it ends, which will take roughly 30 times longer than 
it failed to match test_13.

If we were building a regexp _tester_, we'd spin off a new process to run the 
regexp, and kill the process if it took "too long".  But that's not we're doing 
- library functions do what you tell them to do ;-)

In this case, it's easily repaired.  For example, replace

"\d+,? ?"

 by 

"\d+(?=[ ,)]),? ?"

This uses a lookahead assertion to _require_ that a digit string is followed by 
a blank, comma, or right parenthesis.  Which prevents exponential-time 
backtracking in failing cases.

--
nosy: +tim.peters

___
Python tracker 

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



[issue31763] Add TRACE level to the logging module

2017-10-11 Thread Matthew Patton

New submission from Matthew Patton :

This was inspired by 31732.
The logging module has 5 log levels: CRITICAL, ERROR, WARNING, INFO, DEBUG per 
https://docs.python.org/dev/library/logging.html#logging-levels

However syslog(3) has for decades defined NOTICE and I can't think of a good 
reason why this level was carried through. It serves a very useful distinction 
from routine and not really attention-worthy messages (INFO) but don't rise to 
actual WARNINGs. Things like failed authentication attempts are not warnings 
but also not messages to casually ignore. Hence NOTICE. Individual timed out 
connection attempts but before all attempts exhausted, and many other examples 
exist.

--
components: Library (Lib)
messages: 304168
nosy: mp5023
priority: normal
severity: normal
status: open
title: Add TRACE level to the logging module
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



[issue31757] Tutorial: Fibonacci numbers start with 1, 1

2017-10-11 Thread Heinrich Schnermann

Heinrich Schnermann  added the comment:

I would not insist of starting with 1 instead of 0 (I follow your arguments 
here), but perhaps it would be nice if it would behave the same way in both 
chapters. The first fibonacci number examples in 
https://docs.python.org/3/tutorial/introduction.html#first-steps-towards-programming
 start with 1.

There are three examples here, in the first,

while b < 10:
print(b)

should change to

while a < 10:
print(a)

The output of this first example would have an additional 0:
0
1
1
...

And in the third example

while b < 1000:
print(b, end=',')

should change to

while a < 1000:
print(a, end=',')

where the output of this third example would change from

1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,

to

0,1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,

--

___
Python tracker 

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



[issue31727] FTP_TLS errors when

2017-10-11 Thread Jonathan

Jonathan  added the comment:

Just tested this with Python 3.7.0a1. I'm afraid it makes no difference. Exact 
same error:

*cmd* 'LIST'
*put* 'LIST\r\n'
*get* '150 Accepted data connection\n'
*resp* '150 Accepted data connection'
Traceback (most recent call last):
  File "c:\backup_script.py", line 385, in run_ftps
ftps.dir()
  File "c:\Python37\lib\ftplib.py", line 575, in dir
self.retrlines(cmd, func)
  File "c:\Python37\lib\ftplib.py", line 485, in retrlines
conn.unwrap()
  File "c:\Python37\lib\ssl.py", line 1059, in unwrap
s = self._sslobj.unwrap()
  File "c:\Python37\lib\ssl.py", line 706, in unwrap
return self._sslobj.shutdown()
OSError: [Errno 0] Error

--

___
Python tracker 

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



[issue31761] Possible error in devguide part about tests

2017-10-11 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
nosy: +haypo

___
Python tracker 

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



[issue31759] re wont recover nor fail on runaway regular expression

2017-10-11 Thread Raphaël Riel

Raphaël Riel  added the comment:

Results for my local computer:

```
Attempting test_01
Done in 0.12ms
Attempting test_02
Done in 1.52ms
Attempting test_03
Done in 26.24ms
Attempting test_04
Done in 432.32ms
Attempting test_05
Done in 886.3ms
Attempting test_06
Done in 1757.07ms
Attempting test_07
Done in 3388.92ms
Attempting test_08
Done in 6669.02ms
Attempting test_09
Done in 13088.37ms
Attempting test_10
Done in 26600.23ms
Attempting test_11
Done in 6722.9ms
Attempting test_12
Done in 211192.82ms
Attempting test_13
Done in 6850465.09ms
Attempting test_14
^CTraceback (most recent call last):
  File "/Users/rriel/Desktop/re_backtracking.py", line 26, in 
bad_expression.sub("IN_GROUP", statement)
KeyboardInterrupt
```

Cancelled test_14...

--

___
Python tracker 

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



[issue31758] various refleaks in _elementtree

2017-10-11 Thread Oren Milman

Change by Oren Milman :


--
keywords: +patch
pull_requests: +3931
stage: needs patch -> patch review

___
Python tracker 

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



[issue31762] Issue in login

2017-10-11 Thread Nikhil

New submission from Nikhil :

I have included the screen shot

--
files: Screenshot_20171011_222848.png
messages: 304164
nosy: Nik101
priority: normal
severity: normal
status: open
title: Issue in login
Added file: https://bugs.python.org/file47213/Screenshot_20171011_222848.png

___
Python tracker 

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



[issue31761] Possible error in devguide part about tests

2017-10-11 Thread Denis Osipov

New submission from Denis Osipov :

In Developer Guide says:

"If you don’t have easy access to a command line, you can run the test suite 
from a Python or IDLE shell:

>>> from test import autotest"

But I can't run test from IDLE:

Traceback (most recent call last):
  File "", line 1, in 
from test import autotest
  File "D:\repos\cpython\Lib\test\autotest.py", line 5, in 
main()
  File "D:\repos\cpython\Lib\test\libregrtest\main.py", line 585, in main
Regrtest().main(tests=tests, **kwargs)
  File "D:\repos\cpython\Lib\test\libregrtest\main.py", line 510, in main
self._main(tests, kwargs)
  File "D:\repos\cpython\Lib\test\libregrtest\main.py", line 524, in _main
setup_tests(self.ns)
  File "D:\repos\cpython\Lib\test\libregrtest\setup.py", line 18, in setup_tests
faulthandler.enable(all_threads=True)
io.UnsupportedOperation: fileno

If I understand it correct, this behavior is reasonable (issues 3003 and 25588).
Maybe it's worth to remove words about running from IDLE. Or in case if it's 
possible to run such tests add some words about it.

--
assignee: docs@python
components: Documentation
messages: 304163
nosy: denis-osipov, docs@python
priority: normal
severity: normal
status: open
title: Possible error in devguide part about tests
type: behavior
versions: Python 3.7, Python 3.8

___
Python tracker 

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



[issue31327] bug in dateutil\tz\tz.py

2017-10-11 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Is this similar to issue 29097?

--

___
Python tracker 

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



[issue31327] bug in dateutil\tz\tz.py

2017-10-11 Thread Tim Peters

Tim Peters  added the comment:

I'll just add that it may be a different issue to argue about how 
`_naive_is_dst()` is implemented.

--
nosy: +belopolsky

___
Python tracker 

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



[issue31327] bug in dateutil\tz\tz.py

2017-10-11 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

Thank you, I will provide a PR for this issue and close it once it's over.

--

___
Python tracker 

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



[issue31756] subprocess.run should alias universal_newlines to text

2017-10-11 Thread Andrew Clegg

Andrew Clegg  added the comment:

OK great, I'll get working on a patch.

--

___
Python tracker 

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



[issue31327] bug in dateutil\tz\tz.py

2017-10-11 Thread Tim Peters

Tim Peters  added the comment:

Since this is a pretty common gotcha, I'd prefer to add it as an example to the 
text I already quoted; e.g., add:

"""
For example, the native Windows C libraries do not support times before the 
epoch, and `localtime(n)` for negative `n` raises `OSError` on Windows.
"""

--
assignee:  -> docs@python
components: +Documentation -Library (Lib)
nosy: +docs@python
type: crash -> enhancement

___
Python tracker 

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



[issue31757] Tutorial: Fibonacci numbers start with 1, 1

2017-10-11 Thread Mark Dickinson

Mark Dickinson  added the comment:

A nice response to the question of whether to start with 0 or 1 here: 
https://stackoverflow.com/a/5901955

> The definition with Fib(0) = 1 is known as the combinatorial
> definition, and Fib(0) = 0 is the classical definition. Both
> are used in the Fibonacci Quarterly, though authors that use
> the combinatorial definition need to add a sentence of
> explanation.

I confess that I hadn't heard of the Fibonacci Quarterly before.

--

___
Python tracker 

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



[issue31757] Tutorial: Fibonacci numbers start with 1, 1

2017-10-11 Thread Mark Dickinson

Mark Dickinson  added the comment:

Is there any particular reason you want to start with 1? While not universal, 
it's standard to define `Fib(0) = 0`, and to start the sequence at `0`. (And 
note that Python usually starts indexing things from 0, so it makes sense to 
start with `Fib(0)` rather than `Fib(1)`.)

In principle, one could define `Fib(0)=1`, `Fib(1)=1`, `Fib(1)=2`, and so on, 
but there's a strong reason not to do so: it breaks (or at least uglifies) many 
nice number-theoretic properties, like `gcd(Fib(m), Fib(n)) == Fib(gcd(m, n))`.

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue31327] bug in dateutil\tz\tz.py

2017-10-11 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

Thank you Tim,

In this case, the documentation seems to be correct, maybe we could close this 
issue because it's independent of Python.

What's your opinion on this point?

Close it or Improve the documentation?

--

___
Python tracker 

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



[issue31758] various refleaks in _elementtree

2017-10-11 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
nosy: +eli.bendersky, scoder, serhiy.storchaka
stage:  -> needs patch
versions: +Python 2.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



[issue31327] bug in dateutil\tz\tz.py

2017-10-11 Thread Tim Peters

Tim Peters  added the comment:

The docs for the `time` module say:

"""
Although this module is always available, not all functions are available on 
all platforms. Most of the functions defined in this module call platform C 
library functions with the same name. It may sometimes be helpful to consult 
the platform documentation, because the semantics of these functions varies 
among platforms.
"""

The Windows `localtime()` simply doesn't support dates before the epoch:

https://msdn.microsoft.com/en-us/library/aa246456(v=vs.60).aspx

--
nosy: +tim.peters

___
Python tracker 

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



[issue31415] Add -X option to show import time

2017-10-11 Thread STINNER Victor

STINNER Victor  added the comment:

> Why global _PyTime_GetWinPerfCounterWithInfo() is needed at all? It seems to 
> me that _PyTime_GetPerfCounterWithInfo() can be used instead. Smaller API is 
> better.

I chose to expose _PyTime_GetWinPerfCounterWithInfo() to make my change as 
small as possible.

I didn't want to break the old time.clock() clock by mistake.

By the way, time.clock() is deprecated since Python 3.3. It's maybe time to 
drop it?

--

___
Python tracker 

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



[issue31327] bug in dateutil\tz\tz.py

2017-10-11 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

Hi Steve, I have added you on this issue because it's related to Windows.

Maybe you could check it.

--
nosy: +matrixise, steve.dower

___
Python tracker 

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



[issue31415] Add -X option to show import time

2017-10-11 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Why global _PyTime_GetWinPerfCounterWithInfo() is needed at all? It seems to me 
that _PyTime_GetPerfCounterWithInfo() can be used instead. Smaller API is 
better.

_PyTime_GetPerfCounter() is a simple wrapper around 
_PyTime_GetPerfCounterWithInfo() and is used only in one place. Getting rid of 
it will simplify C API too.

--

___
Python tracker 

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



[issue31756] subprocess.run should alias universal_newlines to text

2017-10-11 Thread Steve Dower

Steve Dower  added the comment:

> just an alias

Which I recognise is in the bug title. My point is that the enhancement itself 
is less relevant than the rationale and the documentation. 

Without a doc patch, there's really nothing to discuss here other than 
duplicating APIs (which is probably justified, even though it looks like a 
wart).

--

___
Python tracker 

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



[issue31756] subprocess.run should alias universal_newlines to text

2017-10-11 Thread Steve Dower

Steve Dower  added the comment:

Really, this is just an alias for universal_newlines in Popen.__init__. So we 
add the parameter and:

+if text:
+universal_newlines = True
 self.universal_newlines = universal_newlines

And 99% of the change is making it clear in the docs why we have two arguments 
with the same meaning.

--

___
Python tracker 

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



[issue31760] Re-definition of _POSIX_C_SOURCE with Fedora 26.

2017-10-11 Thread Stéphane Wirtel

New submission from Stéphane Wirtel :

Hi all,

Is it problematic ? if it is not the case, we can close it.


In file included from 
/home/stephane/src/github.com/python/cpython/Modules/expat/expat_config.h:8:0,
 from 
/home/stephane/src/github.com/python/cpython/Modules/expat/xmltok.c:41:
./pyconfig.h:1457:0: warning: "_POSIX_C_SOURCE" redefined
 #define _POSIX_C_SOURCE 200809L
 
In file included from /usr/include/bits/libc-header-start.h:33:0,
 from /usr/include/string.h:26,
 from 
/home/stephane/src/github.com/python/cpython/Modules/expat/xmltok.c:35:
/usr/include/features.h:286:0: note: this is the location of the previous 
definition
 # define _POSIX_C_SOURCE 199506L


Stéphane

--
messages: 304148
nosy: matrixise
priority: normal
severity: normal
status: open
title: Re-definition of _POSIX_C_SOURCE with Fedora 26.
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



[issue28647] python --help: -u is misdocumented as binary mode

2017-10-11 Thread STINNER Victor

STINNER Victor  added the comment:

I just checked the master branch:

-u : unbuffered binary stdout and stderr, stdin always buffered;
 also PYTHONUNBUFFERED=x
 see man page for details on internal buffering relating to '-u'

The doc is wrong. stdout and stderr are fully unbuferred since Serhiy changed 
them: commit 77732be801c18013cfbc86e27fcc50194ca22c8e, bpo-30404.

--
resolution: fixed -> 
status: closed -> open
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



[issue31759] re wont recover nor fail on runaway regular expression

2017-10-11 Thread Raphaël Riel

New submission from Raphaël Riel :

re won't raise nor return when working with Runaway Regular Expression.
It will compute "almost" indefinitely. Although I'm pretty sure it *may* 
complete sometime, it's definetly looks like it's stuck.

```
> python -
Python 3.6.2 (default, Aug 23 2017, 14:57:08)
[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.42)]
```

Reproduce with attached file.

Should there be a (configurable?) limit on the number of steps involved in the 
process.
Or some warnings and/or hard limit that raises exception?

https://pythex.org/ will fail with a HTTP502 BadGateway (server taking too long 
to respond)
https://regex101.com/ python's tester seems to set a limit for this case. I 
can't say how they managed this.

--
components: Regular Expressions
files: re_backtracking.py
messages: 304146
nosy: Raphaël Riel, ezio.melotti, mrabarnett
priority: normal
severity: normal
status: open
title: re wont recover nor fail on runaway regular expression
type: behavior
versions: Python 3.6
Added file: https://bugs.python.org/file47212/re_backtracking.py

___
Python tracker 

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



[issue31758] various refleaks in _elementtree

2017-10-11 Thread Oren Milman

New submission from Oren Milman :

The following code results in refleaks:
import sys
import _elementtree
builder = _elementtree.TreeBuilder()
parser = _elementtree.XMLParser(target=builder)

refcount_before = sys.gettotalrefcount()
parser.__init__(target=builder)
print(sys.gettotalrefcount() - refcount_before)  # should be close to 0

This is because _elementtree_XMLParser___init___impl()
(in Modules/_elementtree.c) doesn't decref before assigning to fields of
`self`.


The following code also results in refleaks:
import sys
import _elementtree
elem = _elementtree.Element(42)
elem.__setstate__({'tag': 42, '_children': list(range(1000))})

refcount_before = sys.gettotalrefcount()
elem.__setstate__({'tag': 42, '_children': []})
print(sys.gettotalrefcount() - refcount_before)  # should be close to -1000

This is because element_setstate_from_attributes() doesn't decref the old
children before storing the new children.


I would open a PR to fix this soon.

--
components: XML
messages: 304145
nosy: Oren Milman
priority: normal
severity: normal
status: open
title: various refleaks in _elementtree
type: resource usage
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



[issue31415] Add -X option to show import time

2017-10-11 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +3930

___
Python tracker 

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



[issue23532] add example of 'first match wins' to regex "|" documentation?

2017-10-11 Thread Berker Peksag

Change by Berker Peksag :


--
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



[issue31757] Tutorial: Fibonacci numbers start with 1, 1

2017-10-11 Thread Heinrich Schnermann

New submission from Heinrich Schnermann :

In https://docs.python.org/3/tutorial/controlflow.html#defining-functions both 
examples produce fibonacci numbers starting with 0. They should start with 1, 
as in the example in 
https://docs.python.org/3/tutorial/introduction.html#first-steps-towards-programming

The first example should change the lines
while a < n:
print(a, end=' ')
to
while b < n:
print(b, end=' ')

and the second example should change the lines
while a < n:
result.append(a)# see below
to
while b < n:
result.append(b)# see below

--
assignee: docs@python
components: Documentation
messages: 304144
nosy: docs@python, skyhein
priority: normal
severity: normal
status: open
title: Tutorial: Fibonacci numbers start with 1, 1
type: behavior
versions: Python 3.6

___
Python tracker 

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



[issue31741] backports import path can not be overridden in Windows (Linux works fine)

2017-10-11 Thread Paul Moore

Paul Moore  added the comment:

My feeling is still that it's an issue with things (i.e., imports) happening 
before you adjust sys.path. But without seeing actual code that reproduces the 
issue, there's no way of being sure. And if that is what's going on, it 
wouldn't be an issue with core Python.

--

___
Python tracker 

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



[issue31753] Unnecessary closure in ast.literal_eval

2017-10-11 Thread Aaron Hall

Aaron Hall  added the comment:

So... moving the closure (which may be called recursively) to the global scope 
actually does improve performance (for small cases, about 10% - larger cases 
amortize the cost of the closure being built, but in a 100 item dictionary, 
still about 4% faster to extricate the closure). So I'm reopening. Also 
suggesting we consider doing this with other functions if they are 
unnecessarily closures in the module.

`fix_missing_locations` appears to be another such function with an unnecessary 
closure.

the closure in `dump` cannot be removed without some rewriting of the 
signature, as it uses variables it closes over. Not sure this would be worth it.

--
resolution: rejected -> 
status: closed -> open

___
Python tracker 

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



[issue28647] python --help: -u is misdocumented as binary mode

2017-10-11 Thread Gareth Rees

Gareth Rees  added the comment:

You're welcome.

--

___
Python tracker 

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



[issue28647] python --help: -u is misdocumented as binary mode

2017-10-11 Thread Berker Peksag

Berker Peksag  added the comment:

Thank you for the patch, Gareth.

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

___
Python tracker 

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



[issue28647] python --help: -u is misdocumented as binary mode

2017-10-11 Thread Berker Peksag

Berker Peksag  added the comment:


New changeset 5f908005ce16b06d5af7b413264009c4b062f33c by Berker Peksag in 
branch '3.6':
bpo-28647: Update -u documentation (GH-3954)
https://github.com/python/cpython/commit/5f908005ce16b06d5af7b413264009c4b062f33c


--

___
Python tracker 

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



[issue28157] Document time module constants (timezone, tzname, etc.) as deprecated.

2017-10-11 Thread Berker Peksag

Berker Peksag  added the comment:

This issue can be closed now. Thank you, everyone!

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

___
Python tracker 

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



[issue31756] subprocess.run should alias universal_newlines to text

2017-10-11 Thread Barry A. Warsaw

Change by Barry A. Warsaw :


--
nosy: +barry

___
Python tracker 

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



[issue28157] Document time module constants (timezone, tzname, etc.) as deprecated.

2017-10-11 Thread Berker Peksag

Berker Peksag  added the comment:


New changeset 764969a4b9ed7c6d2adbc04269f9b4fa392a1eed by Berker Peksag (Miss 
Islington (bot)) in branch '3.6':
[3.6] bpo-28157: Improvements for the time module documentation (GH-928)
https://github.com/python/cpython/commit/764969a4b9ed7c6d2adbc04269f9b4fa392a1eed


--

___
Python tracker 

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



[issue28647] python --help: -u is misdocumented as binary mode

2017-10-11 Thread Berker Peksag

Berker Peksag  added the comment:

Pull request for issue 30404 has been merged so we only need the documentation 
patch for the 3.6 branch (unfortunately 3.5 is now in security-fix-only mode) 
I've opened PR 3954.

--
versions:  -Python 3.5, Python 3.7

___
Python tracker 

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



[issue28647] python --help: -u is misdocumented as binary mode

2017-10-11 Thread Berker Peksag

Change by Berker Peksag :


--
pull_requests: +3929

___
Python tracker 

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



[issue31728] crashes in _elementtree due to unsafe decrefs of Element.text and Element.tail

2017-10-11 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Thank you Oren!

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

___
Python tracker 

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



[issue31741] backports import path can not be overridden in Windows (Linux works fine)

2017-10-11 Thread R. David Murray

R. David Murray  added the comment:

Ah, so backports is a package on pypi.  You should report this problem wherever 
they do their bug tracking.  It is *possible* there is some problem in 2.7 on 
windows, but it is much more likely to be a bug in backports on windows.  In 
sort, python does not do *anything* special with a directory named backports; 
whatever is happening is a consequence of how that package (or one of the 
packages you have installed that installs into backports) interacts with the 
generic python import machinery.

Perhaps Paul will see something of interest here, though.

--
resolution:  -> third party

___
Python tracker 

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



[issue28157] Document time module constants (timezone, tzname, etc.) as deprecated.

2017-10-11 Thread Roundup Robot

Change by Roundup Robot :


--
keywords: +patch
pull_requests: +3928

___
Python tracker 

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



[issue31728] crashes in _elementtree due to unsafe decrefs of Element.text and Element.tail

2017-10-11 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset f15058a697de12b0efe6c7ebc38fe61a993bb5d5 by Serhiy Storchaka 
(Oren Milman) in branch '2.7':
[2.7] bpo-31728: Prevent crashes in _elementtree due to unsafe cleanup of 
Element.text and Element.tail (GH-3924) (#3950)
https://github.com/python/cpython/commit/f15058a697de12b0efe6c7ebc38fe61a993bb5d5


--

___
Python tracker 

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



[issue28157] Document time module constants (timezone, tzname, etc.) as deprecated.

2017-10-11 Thread Berker Peksag

Berker Peksag  added the comment:


New changeset 703ff381ffa946c23e7e25b0ae93a636a2607a40 by Berker Peksag (Cheryl 
Sabella) in branch 'master':
bpo-28157: Improvements for the time module documentation (GH-928)
https://github.com/python/cpython/commit/703ff381ffa946c23e7e25b0ae93a636a2607a40


--
nosy: +berker.peksag

___
Python tracker 

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



[issue31490] assertion failure in ctypes in case an _anonymous_ attr appears outside _fields_

2017-10-11 Thread Oren Milman

Change by Oren Milman :


--
pull_requests: +3927
stage: resolved -> patch review

___
Python tracker 

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



[issue31752] Assertion failure in timedelta() in case of bad __divmod__

2017-10-11 Thread Louie Lu

Louie Lu  added the comment:

I got a different result in latest commit: eeb5ffd54e5

➜  cpython git:(master) ✗ ./python test.py
Traceback (most recent call last):
  File "test.py", line 15, in 
timedelta(hours=BadInt(1))
SystemError:  returned NULL without setting an error

Do I miss some configure, I'm using ./configure --with-debug

--
nosy: +louielu

___
Python tracker 

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



  1   2   >