unable to to install paython

2019-08-28 Thread Alemu Geletew via Python-list


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


[issue36167] DOC: Incorrect capitalization in Programming FAQ

2019-08-28 Thread miss-islington


miss-islington  added the comment:


New changeset 409493d0acdb8dec55868bb5c6af427ce31ff555 by Miss Islington (bot) 
in branch '3.7':
bpo-36167: fix an incorrect capitalization (GH-14482)
https://github.com/python/cpython/commit/409493d0acdb8dec55868bb5c6af427ce31ff555


--

___
Python tracker 

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



[issue36167] DOC: Incorrect capitalization in Programming FAQ

2019-08-28 Thread miss-islington


miss-islington  added the comment:


New changeset e009a91607e7a81302b98d1b322d564ddc1fce9d by Miss Islington (bot) 
in branch '3.8':
bpo-36167: fix an incorrect capitalization (GH-14482)
https://github.com/python/cpython/commit/e009a91607e7a81302b98d1b322d564ddc1fce9d


--
nosy: +miss-islington

___
Python tracker 

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



[issue36167] DOC: Incorrect capitalization in Programming FAQ

2019-08-28 Thread Ned Deily


Ned Deily  added the comment:


New changeset 3aa48b88c7485aca1fdfa54b3d8e53931ff067fd by Ned Deily (avinassh) 
in branch 'master':
bpo-36167: fix an incorrect capitalization (GH-14482)
https://github.com/python/cpython/commit/3aa48b88c7485aca1fdfa54b3d8e53931ff067fd


--
nosy: +ned.deily

___
Python tracker 

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



[issue36167] DOC: Incorrect capitalization in Programming FAQ

2019-08-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15250
pull_request: https://github.com/python/cpython/pull/15574

___
Python tracker 

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



[issue36167] DOC: Incorrect capitalization in Programming FAQ

2019-08-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15251
pull_request: https://github.com/python/cpython/pull/15575

___
Python tracker 

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



pandas loc on str lower for column comparison

2019-08-28 Thread Sayth Renshaw


Hi

I am importing 4 columns into a dataframe from a spreadsheet.

My goal is to create a 5th column with TRUE or False if column 4 (str) matches 
column 3.

Trying to leverage this answer https://stackoverflow.com/a/35940955/461887

This is my code 

import pandas as pd

xls = pd.ExcelFile("Melbourne.xlsx")
df = xls.parse('Sheet1', skiprows= 4)
df1 = df[['UID','Name','New Leader','Current Team', 'New Team']]
df1['Difference'] = df1['Current Team'].str.lower().str.replace('s/+',"") == 
df1['New Team'].str.lower().str.replace('s/+',"")

Which gives this error

C:\Users\u369811\AppData\Local\Continuum\anaconda3\lib\site-packages\ipykernel_launcher.py:6:
 SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: 
http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy

If I update the line to use loc as this I still receive a long error.

df1['Difference'] = df1.loc['Current Team'].str.lower().str.replace('s/+',"") 
== df1.loc['New Team'].str.lower().str.replace('s/+',"")

What am I missing?

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


[issue18049] Re-enable threading test on macOS

2019-08-28 Thread miss-islington


miss-islington  added the comment:


New changeset f92bb6ed336c49cabf30717c3b741b1b4284f491 by Miss Islington (bot) 
in branch '3.8':
bpo-18049: Define THREAD_STACK_SIZE for AIX to pass default recursion limit 
test (GH-15081)
https://github.com/python/cpython/commit/f92bb6ed336c49cabf30717c3b741b1b4284f491


--

___
Python tracker 

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



[issue36511] Add Windows ARM32 buildbot

2019-08-28 Thread Ned Deily


Ned Deily  added the comment:

> Can this issue now be closed?

I spoke too soon. It appears there's another open backport PR-14244 for this 
issue that needs some conflict resolution to be merged.

--

___
Python tracker 

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



[issue36511] Add Windows ARM32 buildbot

2019-08-28 Thread Ned Deily


Ned Deily  added the comment:

I manually restarted and merged the stalled 3.8 backport for 3.8.0b4.  Can this 
issue now be closed?

--
nosy: +ned.deily
versions: +Python 3.9

___
Python tracker 

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



[issue25777] Misleading descriptions in docs about invoking descriptors.

2019-08-28 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
keywords: +patch
pull_requests: +15249
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/15573

___
Python tracker 

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



[issue36511] Add Windows ARM32 buildbot

2019-08-28 Thread miss-islington


miss-islington  added the comment:


New changeset ed00fee7d4c28489b5d6e4580b1e1fe0855687ca by Miss Islington (bot) 
in branch '3.8':
bpo-36511: Fix failures in Windows ARM32 buildbot (GH-15181)
https://github.com/python/cpython/commit/ed00fee7d4c28489b5d6e4580b1e1fe0855687ca


--

___
Python tracker 

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



[issue18049] Re-enable threading test on macOS

2019-08-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15248
pull_request: https://github.com/python/cpython/pull/15572

___
Python tracker 

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



[issue34775] pathlib.PurePath division raises TypeError instead of returning NotImplemented

2019-08-28 Thread Ned Deily


Ned Deily  added the comment:

The change was pushed for release in 3.8.0b4.  I don't think we should backport 
it to 3.7 at this stage in its lifecycle as the old behavior has been around 
for a long time. Thanks, everyone!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.9 -Python 3.6, Python 3.7

___
Python tracker 

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



[issue37964] F_GETPATH is not available in fcntl.fcntl

2019-08-28 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset 465e5d5bcbfd42be058d3584ccb421405eba1594 by Benjamin Peterson in 
branch 'master':
bpo-37964: Make sure test works if TESTFN is in a non-ASCII directory. 
(GH-15568)
https://github.com/python/cpython/commit/465e5d5bcbfd42be058d3584ccb421405eba1594


--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue34775] pathlib.PurePath division raises TypeError instead of returning NotImplemented

2019-08-28 Thread Ned Deily


Ned Deily  added the comment:


New changeset 4adcaf81513e57a2a4e278073a89efb1375af8df by Ned Deily (Miss 
Islington (bot)) in branch '3.8':
bpo-34775: Return NotImplemented in PurePath division. (GH-9509) (GH-15172)
https://github.com/python/cpython/commit/4adcaf81513e57a2a4e278073a89efb1375af8df


--
nosy: +ned.deily

___
Python tracker 

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



[issue37482] Email address display name fails with both encoded words and special chars

2019-08-28 Thread Ned Deily


Ned Deily  added the comment:

I manually merged the stalled 3.8 backport to make 3.8.0b4.  Can this issue now 
be closed?

--

___
Python tracker 

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



[issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English

2019-08-28 Thread miss-islington


miss-islington  added the comment:


New changeset e471a543a4f7c52a8d0081ec5142adab3416d8fb by Miss Islington (bot) 
in branch '3.8':
bpo-18378: Recognize "UTF-8" as a valid name in locale._parse_localename 
(GH-14736)
https://github.com/python/cpython/commit/e471a543a4f7c52a8d0081ec5142adab3416d8fb


--

___
Python tracker 

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



[issue36511] Add Windows ARM32 buildbot

2019-08-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15247
pull_request: https://github.com/python/cpython/pull/15571

___
Python tracker 

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



[issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English

2019-08-28 Thread miss-islington


miss-islington  added the comment:


New changeset 554143ebc2546e0b8b722dfafe397c0316f29980 by Miss Islington (bot) 
in branch '3.7':
bpo-18378: Recognize "UTF-8" as a valid name in locale._parse_localename 
(GH-14736)
https://github.com/python/cpython/commit/554143ebc2546e0b8b722dfafe397c0316f29980


--
nosy: +miss-islington

___
Python tracker 

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



[issue36743] Docs: Descript __get__ signature defined differently across the docs

2019-08-28 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Collecting various factlets on this topic

PEP 252 gives the specification for the descriptor protocol: "__get__(): a 
function callable with one or two arguments that retrieves the attribute value 
from an object."

function_get, property_get, classmethod_get, and staticmethod_get all support 
calls with one or two arguments:

>>> a = A()
>>> class A:
def m(self):
return 42
@property
def p(self):
return 43
@classmethod
def c(cls):
return 44
@staticmethod
def s():
return 45

>>> a = A()
>>> vars(A)['m'].__get__(a)()
42
>>> vars(A)['m'].__get__(a, A)()
42
>>> vars(A)['p'].__get__(a)
43
>>> vars(A)['p'].__get__(a, A)
43
>>> vars(A)['c'].__get__(a)()
44
>>> vars(A)['c'].__get__(a, A)()
44
>>> vars(A)['s'].__get__(a)()
45
>>> vars(A)['s'].__get__(a, A)()
45

Python functions that comply with the specification should also do the same (as 
taught by the descriptor HOWTO).  That said, I have found multiple Python 
functions that aren't providing the None default.  I will fix those as I find 
them.

type.__getattribute__, object.__getattribute__ and super.__getattribute__ 
always call __get__ with both attributes specified:

>>> class D:
def __get__(*args):
print(args)

>>> class C:
d = D()

>>> class S(C):
def f(self):
return super().d

>>> C.d
(<__main__.D object at 0x104d967f0>, None, )
>>> C().d
(<__main__.D object at 0x104d967f0>, <__main__.C object at 0x104df77c0>, 
)
>>> S().f()
(<__main__.D object at 0x104d967f0>, <__main__.S object at 0x104df7580>, 


--

___
Python tracker 

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



[issue37482] Email address display name fails with both encoded words and special chars

2019-08-28 Thread Ned Deily


Ned Deily  added the comment:


New changeset bd127b1b7dd50c76c4419d9c87c12901527d19da by Ned Deily (bsiem) in 
branch '3.8':
[3.8] bpo-37482: Fix email address name with encoded words and special chars 
(GH-14561) (GH-15380)
https://github.com/python/cpython/commit/bd127b1b7dd50c76c4419d9c87c12901527d19da


--
nosy: +ned.deily

___
Python tracker 

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



[issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English

2019-08-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15245
pull_request: https://github.com/python/cpython/pull/15569

___
Python tracker 

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



[issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English

2019-08-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15246
pull_request: https://github.com/python/cpython/pull/15570

___
Python tracker 

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



[issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English

2019-08-28 Thread Ned Deily


Ned Deily  added the comment:


New changeset b0caf329815120acf50287e29858093d328b0e3c by Ned Deily (Ronald 
Oussoren) in branch 'master':
bpo-18378: Recognize "UTF-8" as a valid name in locale._parse_localename 
(GH-14736)
https://github.com/python/cpython/commit/b0caf329815120acf50287e29858093d328b0e3c


--

___
Python tracker 

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



[SOLVED] Re: Compare zip lists where order is important

2019-08-28 Thread Sayth Renshaw
On Thursday, 29 August 2019 14:03:44 UTC+10, Sayth Renshaw  wrote:
> On Thursday, 29 August 2019 13:53:43 UTC+10, Sayth Renshaw  wrote:
> > On Thursday, 29 August 2019 13:25:01 UTC+10, Sayth Renshaw  wrote:
> > > Hi
> > > 
> > > Trying to find whats changed in this example. Based around work and team 
> > > reschuffles.
> > > 
> > > So first I created my current teams and then my shuffled teams.
> > > 
> > > people = ["Tim","Bill","Sally","Ally","Fred","Fredricka"]
> > > team_number = [1,1,2,2,3,3]
> > > 
> > > shuffle_people = ["Fredricka","Bill","Sally","Tim","Ally","Fred"]
> > > shuffle_team_number = [1,1,2,2,3,3]
> > > 
> > > Then combine.
> > > 
> > > teams = list(zip(people,team_number))
> > > shuffle_teams = list(zip(shuffle_people, shuffle_team_number))
> > > 
> > > Then I am attempting to compare for change.
> > > 
> > > [i for i, j in zip(teams, shuffle_teams) if i != j]
> > > 
> > > #Result
> > > [('Tim', 1), ('Ally', 2), ('Fred', 3), ('Fredricka', 3)]
> > > 
> > > #Expecting to see
> > > 
> > > [('Fredricka', 1),('Tim', 2)]
> > > 
> > > What's a working way to go about this?
> > > 
> > > Sayth
> > 
> > It looks like Tuples are comparing by position changes not content changes.
> > 
> > So this fails too
> > 
> > set(shuffle_teams) & set(teams)
> > # {('Bill', 1), ('Fred', 3), ('Sally', 2)}
> 
> Well this works although its not clear which line is the change.
> 
> set(teams).symmetric_difference(set(shuffle_teams))
> 
> {('Ally', 2),
>  ('Ally', 3), # This is the change Ally changed from 2 to 3
>  ('Fredricka', 1), # However here this first line is the change.
>  ('Fredricka', 3),
>  ('Tim', 1),
>  ('Tim', 2)}
> 
> Hints?

set(shuffle_teams).difference(set(teams))
{('Ally', 3), ('Fredricka', 1), ('Tim', 2)}

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


[issue37964] F_GETPATH is not available in fcntl.fcntl

2019-08-28 Thread Benjamin Peterson


Change by Benjamin Peterson :


--
pull_requests: +15244
pull_request: https://github.com/python/cpython/pull/15568

___
Python tracker 

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



Re: Compare zip lists where order is important

2019-08-28 Thread Sayth Renshaw
On Thursday, 29 August 2019 13:53:43 UTC+10, Sayth Renshaw  wrote:
> On Thursday, 29 August 2019 13:25:01 UTC+10, Sayth Renshaw  wrote:
> > Hi
> > 
> > Trying to find whats changed in this example. Based around work and team 
> > reschuffles.
> > 
> > So first I created my current teams and then my shuffled teams.
> > 
> > people = ["Tim","Bill","Sally","Ally","Fred","Fredricka"]
> > team_number = [1,1,2,2,3,3]
> > 
> > shuffle_people = ["Fredricka","Bill","Sally","Tim","Ally","Fred"]
> > shuffle_team_number = [1,1,2,2,3,3]
> > 
> > Then combine.
> > 
> > teams = list(zip(people,team_number))
> > shuffle_teams = list(zip(shuffle_people, shuffle_team_number))
> > 
> > Then I am attempting to compare for change.
> > 
> > [i for i, j in zip(teams, shuffle_teams) if i != j]
> > 
> > #Result
> > [('Tim', 1), ('Ally', 2), ('Fred', 3), ('Fredricka', 3)]
> > 
> > #Expecting to see
> > 
> > [('Fredricka', 1),('Tim', 2)]
> > 
> > What's a working way to go about this?
> > 
> > Sayth
> 
> It looks like Tuples are comparing by position changes not content changes.
> 
> So this fails too
> 
> set(shuffle_teams) & set(teams)
> # {('Bill', 1), ('Fred', 3), ('Sally', 2)}

Well this works although its not clear which line is the change.

set(teams).symmetric_difference(set(shuffle_teams))

{('Ally', 2),
 ('Ally', 3), # This is the change Ally changed from 2 to 3
 ('Fredricka', 1), # However here this first line is the change.
 ('Fredricka', 3),
 ('Tim', 1),
 ('Tim', 2)}

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


Re: Compare zip lists where order is important

2019-08-28 Thread Sayth Renshaw
On Thursday, 29 August 2019 13:25:01 UTC+10, Sayth Renshaw  wrote:
> Hi
> 
> Trying to find whats changed in this example. Based around work and team 
> reschuffles.
> 
> So first I created my current teams and then my shuffled teams.
> 
> people = ["Tim","Bill","Sally","Ally","Fred","Fredricka"]
> team_number = [1,1,2,2,3,3]
> 
> shuffle_people = ["Fredricka","Bill","Sally","Tim","Ally","Fred"]
> shuffle_team_number = [1,1,2,2,3,3]
> 
> Then combine.
> 
> teams = list(zip(people,team_number))
> shuffle_teams = list(zip(shuffle_people, shuffle_team_number))
> 
> Then I am attempting to compare for change.
> 
> [i for i, j in zip(teams, shuffle_teams) if i != j]
> 
> #Result
> [('Tim', 1), ('Ally', 2), ('Fred', 3), ('Fredricka', 3)]
> 
> #Expecting to see
> 
> [('Fredricka', 1),('Tim', 2)]
> 
> What's a working way to go about this?
> 
> Sayth

It looks like Tuples are comparing by position changes not content changes.

So this fails too

set(shuffle_teams) & set(teams)
# {('Bill', 1), ('Fred', 3), ('Sally', 2)}
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: An "Object" class?

2019-08-28 Thread Alan Bawden
Cristian Cocos  writes:

> Thank you! I can see that the taxonomy of built-in classes (i.e. the
> subclass/superclass relations) is not very developed. At the very least I
> would have loved to see stuff such as int declared as a subClass/subType
> of float and the like--that is, a class taxonomy in tune with standard
> mathematical practice, but I am guessing that mathematical kosher-ness had
> to take a back seat to implementational concerns.

Except that numbers of type `int' are _not_ a subset of numbers of
type `float'!  Some ints are much larger that the largest float.

In fact, both `int' and `float' are subclasses of `numbers.Real'.  While it
is true that `numbers.Real' does not appear in the list returned by
`type.mro(int)', nevertheless `issubclass(int, numbers.Real)' and
`isinstance(2, numbers.Real)' are true.  `type.mro' tells you something
about the _implementation_ of `int' and `float' that you _usually_ shouldn't
concern yourself with.  Stick to `isinstance' and `issubclass' and
everthing looks pretty kosher.

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


if STREAM.isatty():

2019-08-28 Thread Hongyi Zhao
Hi,

I read the following code:

https://github.com/shichao-an/homura/blob/master/homura.py

On the line 265-266, it said:

if STREAM.isatty():
p = (self.progress_template + '\r') % params


What's mean by using the above two lines?  Can I not use them?

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


[issue34410] itertools.tee not thread-safe; can segfault interpreter when wrapped iterator releases GIL

2019-08-28 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I've applied the patch to "master".  I considered backporting but am thinking 
that would be risky at this stage in the 3.8 release.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.9 -Python 2.7, 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



Re: How to use regex to search string between {}?

2019-08-28 Thread Sayth Renshaw


> 
> A site like http://www.pyregex.com/ allows you to check your regex with
> slightly fewer clicks and keystrokes than editing your program.

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


[issue37974] zip() docstring should say 'iterator' instead of 'object with __next__()'

2019-08-28 Thread Sergey Fedoseev


New submission from Sergey Fedoseev :

In [3]: help(zip)

class zip(object)
 |  zip(*iterables) --> zip object
 |  
 |  Return a zip object whose .__next__() method returns a tuple where
 |  the i-th element comes from the i-th iterable argument.  The .__next__()
 |  method continues until the shortest iterable in the argument sequence
 |  is exhausted and then it raises StopIteration.

This description is awkward and should use term 'iterator' as 
https://docs.python.org/3/library/functions.html#zip does.

The same applies to chain(), count() and zip_longest() from itertools.

--
assignee: docs@python
components: Documentation
messages: 350704
nosy: docs@python, sir-sigurd
priority: normal
severity: normal
status: open
title: zip() docstring should say 'iterator' instead of 'object with __next__()'

___
Python tracker 

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



Compare zip lists where order is important

2019-08-28 Thread Sayth Renshaw
Hi

Trying to find whats changed in this example. Based around work and team 
reschuffles.

So first I created my current teams and then my shuffled teams.

people = ["Tim","Bill","Sally","Ally","Fred","Fredricka"]
team_number = [1,1,2,2,3,3]

shuffle_people = ["Fredricka","Bill","Sally","Tim","Ally","Fred"]
shuffle_team_number = [1,1,2,2,3,3]

Then combine.

teams = list(zip(people,team_number))
shuffle_teams = list(zip(shuffle_people, shuffle_team_number))

Then I am attempting to compare for change.

[i for i, j in zip(teams, shuffle_teams) if i != j]

#Result
[('Tim', 1), ('Ally', 2), ('Fred', 3), ('Fredricka', 3)]

#Expecting to see

[('Fredricka', 1),('Tim', 2)]

What's a working way to go about this?

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


Re: How to use regex to search string between {}?

2019-08-28 Thread Jason Friedman
>
> If I have path: /home/admin/hello/yo/{h1,h2,h3,h4}
>
> import re
> r = re.search('{.}', path)
> # r should be ['h1,h2,h3,h4'] but I fail
>
> Why always search nothing?
>

A site like http://www.pyregex.com/ allows you to check your regex with
slightly fewer clicks and keystrokes than editing your program.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue37973] improve docstrings of sys.float_info

2019-08-28 Thread Sergey Fedoseev


New submission from Sergey Fedoseev :

In [8]: help(sys.float_info)

...

 |  
 |  dig
 |  DBL_DIG -- digits
 |

This is not very helpful, 
https://docs.python.org/3/library/sys.html#sys.float_info is more verbose, so 
probably docstrings should be updated from where.

--
assignee: docs@python
components: Documentation
messages: 350703
nosy: docs@python, sir-sigurd
priority: normal
severity: normal
status: open
title: improve docstrings of sys.float_info
type: enhancement

___
Python tracker 

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



[issue34410] itertools.tee not thread-safe; can segfault interpreter when wrapped iterator releases GIL

2019-08-28 Thread hongweipeng


Change by hongweipeng :


--
pull_requests: +15243
pull_request: https://github.com/python/cpython/pull/15567

___
Python tracker 

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



[issue37440] httplib should enable post-handshake authentication for TLS 1.3

2019-08-28 Thread Benjamin Peterson


Benjamin Peterson  added the comment:

Yes, makes sense for 2.7, too. Thanks.

--

___
Python tracker 

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



[issue37428] SSLContext.post_handshake_auth implicitly enables cert validation

2019-08-28 Thread Benjamin Peterson


Benjamin Peterson  added the comment:

Yes, please.

--

___
Python tracker 

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



[issue37964] F_GETPATH is not available in fcntl.fcntl

2019-08-28 Thread miss-islington


miss-islington  added the comment:


New changeset 13f37f2ba8b1fa39f312dca920e847d9c0313c77 by Miss Islington (bot) 
(Vinay Sharma) in branch 'master':
closes bpo-37964: add F_GETPATH command to fcntl (GH-15550)
https://github.com/python/cpython/commit/13f37f2ba8b1fa39f312dca920e847d9c0313c77


--
nosy: +miss-islington
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



[issue16468] argparse only supports iterable choices

2019-08-28 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
keywords: +patch
pull_requests: +15242
pull_request: https://github.com/python/cpython/pull/15566

___
Python tracker 

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



[issue37968] Add a turtle module function to draw a circle centered at the turtle

2019-08-28 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Yehuda, thank you for the suggestions, but we're going to decline.

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



[issue37968] Add a turtle module function to draw a circle centered at the turtle

2019-08-28 Thread Eric V. Smith


Eric V. Smith  added the comment:

I agree that we should close this and not implement a function to draw a circle 
centered on the turtle. The fundamental abstraction with turtle graphics is 
that the turtle is holding a pen. To have the pen draw elsewhere, where the 
turtle does not go, breaks the abstraction.

--
nosy: +eric.smith

___
Python tracker 

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



[issue33955] Implement PyOS_CheckStack on macOS using pthread_get_stack*_np

2019-08-28 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +vstinner

___
Python tracker 

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



[issue37918] What about an enum for open() modes?

2019-08-28 Thread STINNER Victor


STINNER Victor  added the comment:

Please send an email to the python-ideas mailing list, rather than opening a 
bug report at bugs.python.org.

--
nosy: +vstinner
resolution:  -> 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



[issue37385] test_multiprocessing fails on AMD64 FreeBSD CURRENT Shared 2.7

2019-08-28 Thread STINNER Victor


STINNER Victor  added the comment:

AMD64 FreeBSD CURRENT Shared 2.7 is back to green: this issue is a duplicate of 
bpo-28724 that I fixed recently.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Add method send_io, recv_io to the socket module.

___
Python tracker 

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



[issue37959] test_os.test_copy_file_range() killed by SIGSYS (12) on FreeBSD CURRENT buildbot

2019-08-28 Thread STINNER Victor


STINNER Victor  added the comment:

AMD64 FreeBSD CURRENT Shared 3.x is back to green. I close the issue.

https://buildbot.python.org/all/#/builders/168/builds/1356 likely failed 
because kkobs upgrade the FreeBSD CURRENT VM while the buildbot job was running 
(inconsistency between *running* libc and kernel, I guess).

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



[issue37968] Add a turtle module function to draw a circle centered at the turtle

2019-08-28 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Also see:  https://en.wikipedia.org/wiki/The_Paradox_of_Choice

--

___
Python tracker 

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



[issue37968] Add a turtle module function to draw a circle centered at the turtle

2019-08-28 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

> For the best of my (limited) knowledge, there's currently
> no arc() function in module turtle.

circle() takes a second argument called "extent":

   circle(200, 90)# draw 90° of a circle of radius 200

FWIW, searching the turtle documentation page for "arc" immediately finds the 
two argument form of circle, so I don't think there is a discoverability 
problem.

Suggestion for Yehuda:  Consider driving the turtle module from IPython.  It 
has an "%autocall" mode that automatically adds parentheses.  For example:

forward 100
right 90

gets automatically transformed to:
forward(100)
right(90)

FWIW, I concur with Nick that we shouldn't add a new circle function centered 
on the turtle.  He was correct that this would make a great exercise.   More 
importantly, making the module bigger doesn't make it easier to use (see 
https://en.wikipedia.org/wiki/Overchoice ).  You've already indicated that you 
don't yet know the full API and haven't found essential tools like the two 
argument form of circle(), so making the API bigger would likely have made the 
discoverability problem worse.

At this point, I think we should close this tracker issue:

* It's not easily possible to make "rt" generate an error message
* Circle centered on a turtle is best left as an exercise
* arc() is already present in the two argument form of circle()

One other thought:  The Python API was based on other turtle implementations, 
so the API is probably mostly already where it should be.

--
nosy: +rhettinger

___
Python tracker 

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



Re: Fwd: installation problem

2019-08-28 Thread DL Neil

On 29/08/19 10:11 AM, fateme jbr wrote:

Dear Python team


We are a mailing list of enthusiasts with volunteer membership.



I downloaded "Windows x86-64 executable installer
" form your
website. My windows version is 8.1 and it is 64 bit.  After installation, I
got the message that "Setup was successful", but it didn't lunch to the
program.
When I found the program in start menu, the fallowing window appeared:

[image: Untitled.png]


Attachments are not permitted by the mailing list.



What is the problem? Could you help me to complete the installation please?


Try: Python on Windows FAQ
https://docs.python.org/3/faq/windows.html#how-do-i-run-a-python-program-under-windows

--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list


[issue15206] uuid module falls back to unsuitable RNG

2019-08-28 Thread STINNER Victor


STINNER Victor  added the comment:

I close the issue. Python 3.7 and newer are fixed. Python 2.7 is still 
affected, but I consider that it's ok to leave the bug unfixed in this version.

--

> The random number generator now reseeds after a fork.

I confirm that it's done since Python 3.7, and Python 3.6 doesn't accept 
bugfixes anymore (only security fixes). So the issue is fixed in Python 3.7, 
3.8 and master. For the record, the fix was this change:

commit 346cbd351ee0dd3ab9cb9f0e4cb625556707877e
Author: Antoine Pitrou 
Date:   Sat May 27 17:50:54 2017 +0200

bpo-16500: Allow registering at-fork handlers (#1715)

Backporting this change to Python 3.6 and 3.5 would be too intrusive and risky. 
I don't think that this bug is important enough to be qualified as security 
vulnerability (the issue type is not "Security").


For Python 2.7, honestly, I don't think that the issue matters enough to 
justify to fix it today, knowning that Python 2.7 will reach its end of life at 
the end of the year. Moreover, apart Christian Heimes, no user ever complained 
about this issue.


Note: uuid.uuid4() always used os.urandom(16) which is not affected by this 
issue on fork. Only uuid.uuid1() and uuid.getnode() has the bug in Python 2.7.

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions: +Python 3.7, Python 3.8, Python 3.9 -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



Fwd: installation problem

2019-08-28 Thread fateme jbr
Dear Python team

I downloaded "Windows x86-64 executable installer
" form your
website. My windows version is 8.1 and it is 64 bit.  After installation, I
got the message that "Setup was successful", but it didn't lunch to the
program.
When I found the program in start menu, the fallowing window appeared:

[image: Untitled.png]
What is the problem? Could you help me to complete the installation please?

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


[issue23878] Missing sanity checks for various C library function calls...

2019-08-28 Thread Zackery Spytz


Change by Zackery Spytz :


--
pull_requests: +15241
pull_request: https://github.com/python/cpython/pull/1

___
Python tracker 

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



[issue37971] Wrong trace with multiple decorators (linenumber wrong in frame)

2019-08-28 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

In Python 3.8+ I got:

Traceback (most recent call last):
  File "/home/serhiy/py/cpython/issue37971.py", line 10, in 
def foo():
  File "/home/serhiy/py/cpython/issue37971.py", line 2, in printingdec
raise Exception()
Exception

The traceback refers to the line where the function is defined.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue23878] Missing sanity checks for various C library function calls...

2019-08-28 Thread STINNER Victor


STINNER Victor  added the comment:

The fseek() call has been removed from _Py_FindEnvConfigValue (previously in 
getpath.c).

There is a single file called ffi.c in the master branch: 
./Modules/_ctypes/libffi_osx/ffi.c And this file doesn't call calloc(). I guess 
that the bug was in our embedded copy of libffi 
(Modules/_ctypes/libffi/src/arm/ffi has been removed). Copy which has been 
removed in the meanwhile. If someone cares, check if all calloc() calls are 
checked for failure in https://sourceware.org/libffi/

>From the Python point of view, all bugs described in this issue are now fixed.

Thanks for the report and thanks for the fix ;-)

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions:  -Python 2.7, 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



[issue23878] Missing sanity checks for various C library function calls...

2019-08-28 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset e4a5e9b5bb69025eb879cb133259667241d61a1f by Victor Stinner 
(Zackery Spytz) in branch 'master':
bpo-23878: Remove an unneeded fseek() call in _Py_FindEnvConfigValue() 
(GH-15424)
https://github.com/python/cpython/commit/e4a5e9b5bb69025eb879cb133259667241d61a1f


--
nosy: +vstinner

___
Python tracker 

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



[issue37972] unittest.mock.call does not chain __getitem__ to another _Call object

2019-08-28 Thread Ben Hsing


Change by Ben Hsing :


--
keywords: +patch
pull_requests: +15240
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/15565

___
Python tracker 

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



[issue37972] unittest.mock.call does not chain __getitem__ to another _Call object

2019-08-28 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue37972] unittest.mock.call does not chain __getitem__ to another _Call object

2019-08-28 Thread blhsing


New submission from blhsing :

As reported on StackOverflow:
https://stackoverflow.com/questions/57636747/how-to-perform-assert-has-calls-for-a-getitem-call

The following code would output: [call(), call().foo(), 
call().foo().__getitem__('bar')]

from unittest.mock import MagicMock, call
mm = MagicMock()
mm().foo()['bar']
print(mm.mock_calls)

but trying to use that list with mm.assert_has_calls([call(), call().foo(), 
call().foo().__getitem__('bar')]) would result in:

TypeError: tuple indices must be integers or slices, not str

--
components: Library (Lib)
messages: 350688
nosy: Ben Hsing
priority: normal
severity: normal
status: open
title: unittest.mock.call does not chain __getitem__ to another _Call object
type: behavior
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



Guppy-PE/Heapy 0.1.11

2019-08-28 Thread sverker nilsson
I am happy to announce Guppy-PE 0.1.11

Guppy-PE is a library and programming environment for Python,
currently providing in particular the Heapy subsystem, which supports
object and heap memory sizing, profiling and debugging. It also
includes a prototypical specification language, the Guppy
Specification Language (GSL), which can be used to formally specify
aspects of Python programs and generate tests and documentation from a
common source.

The main news in this release:

Contains notes and check that this package is only for Python2. A version for
Python3 is recommended and is available here:

https://github.com/zhuyifei1999/guppy3

License: MIT

The project homepage is on GitHub:

https://svenil.github.io/guppy-pe/

Enjoy,

Sverker Nilsson
--
Python-announce-list mailing list -- python-announce-list@python.org
To unsubscribe send an email to python-announce-list-le...@python.org
https://mail.python.org/mailman3/lists/python-announce-list.python.org/

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


[issue37969] urllib.parse functions reporting false equivalent URIs

2019-08-28 Thread Nick Timkovich


Nick Timkovich  added the comment:

Looking at the history, the line in the docs used to say 

> ... (for example, an empty query (the draft states that these are equivalent).

which was changed to "the RFC" in April 2006 
https://github.com/python/cpython/commit/ad5177cf8da#diff-5b4cef771c997754f9e2feeae11d3b1eL68-R95

The original language was added in February 1995 
https://github.com/python/cpython/commit/a12ef9433baf#diff-5b4cef771c997754f9e2feeae11d3b1eR48-R51

So "the draft" probably meant the draft of RFC-1738 
https://tools.ietf.org/html/rfc1738#section-3.3 which is kinda vague on it. It 
didn't help that rewording it as "the RFC" later when there are 3+ RFCs 
referenced in the lib docs, one of which obsoleted the another RFC and 
definitely changed the meaning of the loose "?".

The draft of 2396 always seemed to have the opposite wording you point out, at 
least back in draft 07 (September 2004): 
https://tools.ietf.org/html/draft-fielding-uri-rfc2396bis-07#section-6.2.3 The 
draft 06 (April 2004) was silent on the matter 
https://tools.ietf.org/html/draft-fielding-uri-rfc2396bis-06#section-6.2.3

--
nosy: +nicktimko

___
Python tracker 

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



Re: An "Object" class?

2019-08-28 Thread Chris Angelico
On Thu, Aug 29, 2019 at 4:35 AM Cristian Cocos  wrote:
>
> Thank you! I can see that the taxonomy of built-in classes (i.e. the
> subclass/superclass relations) is not very developed. At the very least I
> would have loved to see stuff such as int declared as a subClass/subType
> of float and the like--that is, a class taxonomy in tune with standard
> mathematical practice, but I am guessing that mathematical kosher-ness had
> to take a back seat to implementational concerns.

In mathematics, integers are a strict subset of reals, but that
doesn't mean that the integer type is a subclass of the float type.
Floats in computers are not the same as reals in mathematics; most
notably, they are far from infinite in either magnitude or precision.

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


Re: An "Object" class?

2019-08-28 Thread Cristian Cocos
Thank you! I can see that the taxonomy of built-in classes (i.e. the
subclass/superclass relations) is not very developed. At the very least I
would have loved to see stuff such as int declared as a subClass/subType
of float and the like--that is, a class taxonomy in tune with standard
mathematical practice, but I am guessing that mathematical kosher-ness had
to take a back seat to implementational concerns.

Neither does the numbers package bring any order or clarity into this; take
for example the following sentence from the standard type hierarchy (
https://docs.python.org/3/reference/datamodel.html#the-standard-type-hierarchy):
"There are two types of integers [numbers.Integral]: Integers (int) ...
[and] Booleans (bool)" I, for one, cannot help but read this as a subtype
declaration, which appears to be the wrong construal. For one, I am not
sure that numbers.Integral is a type that is returned by the type()
function, regardless of the input argument. Furthermore, it looks to me
that no instance of the int type is an instance of the numbers.Integral
type (and that is based on the fact that type.mro() function applied to
some integer does not list numbers.Integral among the returned values
(although this may also be a consequence of the fact that type() never
returns numbers.Integral)).

Anyway, I am looking forward to your correcting any of the above assertions.

C

On Tue, Aug 27, 2019 at 5:00 PM Terry Reedy  wrote:

> On 8/27/2019 2:19 PM, Cristian Cocos wrote:
> > Thank you! What would be the names of the *class *class,
> > and of the *function *class please?
>
> Use type(ob) to get the internal name of the class of an object.
> Built-in classes that users may need to call in python code are bound to
> the same name in __builtins__, as if __builtins__ were build with class
> statements. but many are not.
>
>  >>> type(object)
> 
>  >>> type(type)
> 
>  >>> type(int)
> 
>  >>> type(abs)  # built-in function
> 
>
> Users can usefully call 'type' but not 'builtin_function_or_method'.
>
>  >>> def(f): pass
>
>  >>> type(f)  # User-defined function.
> 
>  >>> l = lambda: None  # Equivalent lambda expression.
>  >>> type(l)
> 
>
> Creating a function by calling 'function' instead of using 'def' or
> 'lambda' is a super expert endeaver, and the details are CPython
> specific and subject to change in any version.
>
>  >>> type(list.__add__)
> 
>  >>> type(list.append)
> 
>  >>> for k, v in vars(list).items(): print(k, type(v))
> # 36 lines.
>
> To see super classes of a class, use type.mro(cls).  The returned list
> always begins with cls and ends with 'object'
>
>  >>> mro = type.mro
>  >>> mro(object)
> []  # As Chris said, baseclass has no superclass.
>  >>> mro(type)
> [, ]
>  >>> mro(list)
> [, ]
> # Nearly all built-in classes return [cls, 'object'].
>  >>> mro(bool)
> [, , ]
> # The only exception I can think of.
>
> --
> Terry Jan Reedy
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>


-- 
"People think that I must be a very strange person. This is not correct. I
have the heart of a small boy. It is in a glass jar on my desk." -- Stephen
King
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue37971] Wrong trace with multiple decorators (linenumber wrong in frame)

2019-08-28 Thread Joran van Apeldoorn


New submission from Joran van Apeldoorn :

When applying multiple decorators to a function, a traceback from the top 
generator shows the bottom generator instead.
For example


def printingdec(f):
raise Exception()
return f

def dummydec(f):
return f

@printingdec
@dummydec
def foo():
pass


gives
Traceback (most recent call last):
  File "bug.py", line 9, in 
@dummydec
  File "bug.py", line 2, in printingdec
raise Exception()
Exception

instead of
Traceback (most recent call last):
  File "bug.py", line 8, in 
@printingdec
  File "bug.py", line 2, in printingdec
raise Exception()
Exception


Digging around with sys._getframe() it seems that the frame's linenumber is set 
wrong internally, leading to the wrong line being displayed.
The ast does display the correct linenumber.

--
messages: 350686
nosy: control-k
priority: normal
severity: normal
status: open
title: Wrong trace with multiple decorators (linenumber wrong in frame)
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



Re: How do I decouple these two modules?

2019-08-28 Thread Andrea D'Amore
On Wed, 28 Aug 2019 at 10:04, Spencer Du via Python-list
 wrote:
> I have code for a GUI and MQTT […] currently they rely on each other to some 
> extent.

How?

I am failing to see the circular dependency there.


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


[issue15206] uuid module falls back to unsuitable RNG

2019-08-28 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

The random number generator now reseeds after a fork.

Can this now be closed as "out-of-date" or is there still something that needs 
to be done?

--
status: pending -> open

___
Python tracker 

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



[issue37968] Add a turtle module function to draw a circle centered at the turtle

2019-08-28 Thread Yehuda Katz


Yehuda Katz  added the comment:

G-R-E-A-T.

Yehuda (Israel)

On Wed, Aug 28, 2019 at 8:29 PM Mark Dickinson 
wrote:

>
> Mark Dickinson  added the comment:
>
> Updated title, type and Python version (this would be a new feature, so
> would be targeted at Python 3.9).
>
> --
> components: +Library (Lib)
> title: The turtle -> Add a turtle module function to draw a circle
> centered at the turtle
> type:  -> enhancement
> versions: +Python 3.9 -Python 3.7
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue37968] Add a turtle module function to draw a circle centered at the turtle

2019-08-28 Thread Yehuda Katz


Yehuda Katz  added the comment:

G-R-E-A-T.

Yehuda,
Israel

On Wed, Aug 28, 2019 at 8:29 PM Mark Dickinson 
wrote:

>
> Mark Dickinson  added the comment:
>
> Updated title, type and Python version (this would be a new feature, so
> would be targeted at Python 3.9).
>
> --
> components: +Library (Lib)
> title: The turtle -> Add a turtle module function to draw a circle
> centered at the turtle
> type:  -> enhancement
> versions: +Python 3.9 -Python 3.7
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue37176] super() docs don't say what super() does

2019-08-28 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I've add PR 15564 to clarify some known ambiguities for the super() docs 
including a specific example "what it actually does".

--

___
Python tracker 

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



[issue23674] super() documentation isn't very clear

2019-08-28 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
pull_requests: +15239
pull_request: https://github.com/python/cpython/pull/15564

___
Python tracker 

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



[issue37965] CCompiler has_function displays warning

2019-08-28 Thread miss-islington


miss-islington  added the comment:


New changeset ea48966e5d868e2863d896ee909460d482a0513c by Miss Islington (bot) 
in branch '3.7':
closes bpo-37965: Fix compiler warning of distutils CCompiler.test_function. 
(GH-15560)
https://github.com/python/cpython/commit/ea48966e5d868e2863d896ee909460d482a0513c


--

___
Python tracker 

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



[issue37965] CCompiler has_function displays warning

2019-08-28 Thread miss-islington


miss-islington  added the comment:


New changeset 0229b56d8c0cb65b8ad789e69dcd281fd92a6d96 by Miss Islington (bot) 
in branch '2.7':
closes bpo-37965: Fix compiler warning of distutils CCompiler.test_function. 
(GH-15560)
https://github.com/python/cpython/commit/0229b56d8c0cb65b8ad789e69dcd281fd92a6d96


--

___
Python tracker 

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



[issue37965] CCompiler has_function displays warning

2019-08-28 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset 23985c6a64222df46cd7e21b9b21c0e37aa95e10 by Benjamin Peterson 
(Miss Islington (bot)) in branch '3.8':
closes bpo-37965: Fix compiler warning of distutils CCompiler.test_function. 
(GH-15561)
https://github.com/python/cpython/commit/23985c6a64222df46cd7e21b9b21c0e37aa95e10


--

___
Python tracker 

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



[issue37968] Add a turtle module function to draw a circle centered at the turtle

2019-08-28 Thread Mark Dickinson


Change by Mark Dickinson :


--
nosy: +glingl, willingc -mark.dickinson

___
Python tracker 

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



[issue37968] Add a turtle module function to draw a circle centered at the turtle

2019-08-28 Thread Mark Dickinson


Mark Dickinson  added the comment:

Updated title, type and Python version (this would be a new feature, so would 
be targeted at Python 3.9).

--
components: +Library (Lib)
title: The turtle -> Add a turtle module function to draw a circle centered at 
the turtle
type:  -> enhancement
versions: +Python 3.9 -Python 3.7

___
Python tracker 

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



[issue20806] os.times document points to wrong section of non-Linux manual

2019-08-28 Thread Joannah Nanjekye


Joannah Nanjekye  added the comment:

I updated the PR to reference times(2) and times(3) along with an MSDN link.

--

___
Python tracker 

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



[issue37965] CCompiler has_function displays warning

2019-08-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15238
pull_request: https://github.com/python/cpython/pull/15563

___
Python tracker 

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



[issue37965] CCompiler has_function displays warning

2019-08-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15237
pull_request: https://github.com/python/cpython/pull/15562

___
Python tracker 

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



[issue37965] CCompiler has_function displays warning

2019-08-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15236
pull_request: https://github.com/python/cpython/pull/15561

___
Python tracker 

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



[issue37965] CCompiler has_function displays warning

2019-08-28 Thread miss-islington


miss-islington  added the comment:


New changeset 55aabee07501e1468082b3237620e4ecd75c5da6 by Miss Islington (bot) 
(Anonymous Maarten) in branch 'master':
closes bpo-37965: Fix compiler warning of distutils CCompiler.test_function. 
(GH-15560)
https://github.com/python/cpython/commit/55aabee07501e1468082b3237620e4ecd75c5da6


--
nosy: +miss-islington
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



[issue27260] Missing equality check for super objects

2019-08-28 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Though not beautiful, we already have a way to fulfill this rare use case:

>>> class Foo():
pass

>>> s = super(Foo)
>>> t = super(Foo)
>>> (s.__self_class__, s.__self__) == (t.__self_class__, t.__self__)
>>> True

Though awkward to write, it is completely explicit.  That makes it better than 
giving "s == t" a profoundly different meaning than "s.__eq__(t)".  IMO that 
would be an API mistake, making it tricky to do code review and requiring 
special knowledge of a rare corner case.

--
resolution:  -> rejected
stage:  -> resolved
status: open -> closed
versions: +Python 3.9 -Python 3.6

___
Python tracker 

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



[issue37968] The turtle

2019-08-28 Thread Yehuda Katz


Yehuda Katz  added the comment:

Such a function would be welcomed.
For the best of my (limited) knowledge, there's currently no arc() function
in module turtle.

I can't think about a proper name... Sorry.

Yehuda

On Wed, Aug 28, 2019 at 7:55 PM Nick Timkovich 
wrote:

>
> Nick Timkovich  added the comment:
>
> Resolving #1 as you suggest is next to impossible. Python can not deduce
> if you meant to call the function or just refer to its name. Admittedly,
> the latter is strange in non-interactive contexts, but it is valid.
>
> #2, as far as I can tell Logo had an ARC command:
>
> ARC angle radius
>
> draws an arc of a circle, with the turtle at the center,
> with the specified radius, starting at the turtle's
> heading and extending clockwise through the specified
> angle.  The turtle does not move.
>
> I guess I don't know the history about why there's turtle.circle in Python
> which *does* move the turtle, and has the center *not* at the turtle.
> Adding an equivalent "turtle.arc" function might be useful, though the
> naming would be a bit confusing. Can you propose a better name and define
> exactly how it would work?
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue37968] The turtle

2019-08-28 Thread Mark Dickinson


Mark Dickinson  added the comment:

> 1 the next code SHOULD produce an error message. Think that it's followed
> by a few dozens of code lines:
> from turtle import *
> fd; rt(90)

There's no reasonable mechanism in current Python by which this could produce 
an error message; it's not an error, and you'd need to make substantial changes 
to the core language to make it such, including fleshing out exactly what those 
changes would be and how they'd work, and persuading other core developers that 
those changes improve the language.

As Nick Timkovich points out, tools like pylint will flag this sort of thing. 
When I run pylint on your script, the output includes the following:

> untitled.py:3:8: W0104: Statement seems to have no effect 
> (pointless-statement) 

If you really want to pursue the necessary changes in the core language, I'd 
suggest starting a discussion on the python-ideas mailing list; others may have 
innovative suggestions for ameliorating the core problem. But it's just not 
feasible in the language as it stands.

I'd suggest focusing this issue on your second item, and dropping the first.

--
nosy: +mark.dickinson

___
Python tracker 

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



Re: Python unit test framework to fire 1000 unique concurrent requests

2019-08-28 Thread Pankaj Jangid
vishwatheworld...@gmail.com writes:

> Looking for a unit test framework with below requirements:
> 1. Send 1000 unique URL requests in parallel ( Not sequential and not 
> repetitive requests)
> 2. Verify HTTP response status code ( eg: 200, 403, 404 etc)  of each 
> requests in parallel
> 3. Verify Response headers of each URL requests
> 4. Login to remote machine ( to which requests is fired) and verify logs
>
1st is a load testing. You can use something like Apache JMeter. For
other advanced validations use Desktop version of vREST - 
https://desktop.vrest.io/.

Regards.

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


[issue37968] The turtle

2019-08-28 Thread Nick Timkovich


Nick Timkovich  added the comment:

Resolving #1 as you suggest is next to impossible. Python can not deduce if you 
meant to call the function or just refer to its name. Admittedly, the latter is 
strange in non-interactive contexts, but it is valid.

#2, as far as I can tell Logo had an ARC command:

ARC angle radius

draws an arc of a circle, with the turtle at the center, 
with the specified radius, starting at the turtle's 
heading and extending clockwise through the specified 
angle.  The turtle does not move.

I guess I don't know the history about why there's turtle.circle in Python 
which *does* move the turtle, and has the center *not* at the turtle. Adding an 
equivalent "turtle.arc" function might be useful, though the naming would be a 
bit confusing. Can you propose a better name and define exactly how it would 
work?

--

___
Python tracker 

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



[issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent()

2019-08-28 Thread Joannah Nanjekye


Joannah Nanjekye  added the comment:

I updated the PR to make the function internal.

--

___
Python tracker 

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



[issue37968] The turtle

2019-08-28 Thread Yehuda Katz


Yehuda Katz  added the comment:

Hi,

Sorry to say but these don't satisfy my issues.

1 the next code SHOULD produce an error message. Think that it's followed
by a few dozens of code lines:
from turtle import *
fd; rt(90)
2 Old Logo had a useful function of creating a circle AROUND THE TURTLE. It
would be very nice it such a function was built-in in Python's turtle
module.
Giving this to student as a problem is not a good answer, it's more like a
sort of "pass the baby" solution.

Thank you for the fast reply.

On Wed, Aug 28, 2019 at 7:26 PM Yehuda Katz  wrote:

>
> Yehuda Katz  added the comment:
>
> Sorry to say but these don't satisfy my issues.
>
> 1 the next code SHOULD produce an error message. Think that it's followed
> by a few dozens of code lines:
> from turtle import *
> fd; rt(90)
> 2 Old Logo had a useful function of creating a circle AROUND THE TURTLE. It
> would be very nice it such a function was built-in in turtle module.
> Giving this to student as a problem is not a good answer, it's more like a
> sort of "pass the baby" solution.
>
> Thank you for the fast reply.
>
> Yehuda Katz (Israel)
>
> On Wed, Aug 28, 2019 at 7:04 PM Nick Timkovich 
> wrote:
>
> >
> > Nick Timkovich  added the comment:
> >
> > Regarding #1: In Python, you may refer to a variable's name (e.g. `rt`,
> > which is a function), which often has no effect in a script. In the REPL
> > (where you see >>>) it is useful to inspect the object:
> >
> > >>> turtle.rt
> > 
> >
> > In order to call that name/function, parentheses are *required* unlike
> > other languages where they are optional (Ruby). So, you don't get an
> error
> > message, but one is not expected. Linting tools can alert you to
> statements
> > that don't appear to have an effect.
> >
> > Regarding #2: Students of the turtle could create a reusable function to
> > draw a circle with the turtle and return to the starting position. It
> would
> > be an excellent exercise with multiple solutions!
> >
> > --
> > nosy: +nicktimko
> >
> > ___
> > Python tracker 
> > 
> > ___
> >
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue37970] urllib.parse docstrings incomplete

2019-08-28 Thread Zachary Ware


New submission from Zachary Ware :

For example, urlsplit:

>>> from urllib.parse import urlsplit
>>> help(urlsplit)
Help on function urlsplit in module urllib.parse:

urlsplit(url, scheme='', allow_fragments=True)
Parse a URL into 5 components:
:///?#
Return a 5-tuple: (scheme, netloc, path, query, fragment).
Note that we don't break the components up in smaller bits
(e.g. netloc is a single string) and we don't expand % escapes.


The current docstring does not describe the `scheme` or `allow_fragments` 
arguments.  Also, the note about not splitting netloc is misleading; the 
components of netloc (username, password, hostname, and port) are available as 
extra attributes of the returned SplitResult.

urlparse has similar issues; other functions could stand to be checked.

--
assignee: docs@python
components: Documentation, Library (Lib)
keywords: newcomer friendly
messages: 350668
nosy: docs@python, zach.ware
priority: normal
severity: normal
stage: needs patch
status: open
title: urllib.parse docstrings incomplete
versions: Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue37968] The turtle

2019-08-28 Thread Yehuda Katz


Yehuda Katz  added the comment:

Sorry to say but these don't satisfy my issues.

1 the next code SHOULD produce an error message. Think that it's followed
by a few dozens of code lines:
from turtle import *
fd; rt(90)
2 Old Logo had a useful function of creating a circle AROUND THE TURTLE. It
would be very nice it such a function was built-in in turtle module.
Giving this to student as a problem is not a good answer, it's more like a
sort of "pass the baby" solution.

Thank you for the fast reply.

Yehuda Katz (Israel)

On Wed, Aug 28, 2019 at 7:04 PM Nick Timkovich 
wrote:

>
> Nick Timkovich  added the comment:
>
> Regarding #1: In Python, you may refer to a variable's name (e.g. `rt`,
> which is a function), which often has no effect in a script. In the REPL
> (where you see >>>) it is useful to inspect the object:
>
> >>> turtle.rt
> 
>
> In order to call that name/function, parentheses are *required* unlike
> other languages where they are optional (Ruby). So, you don't get an error
> message, but one is not expected. Linting tools can alert you to statements
> that don't appear to have an effect.
>
> Regarding #2: Students of the turtle could create a reusable function to
> draw a circle with the turtle and return to the starting position. It would
> be an excellent exercise with multiple solutions!
>
> --
> nosy: +nicktimko
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue37140] ctypes change made clang fail to build

2019-08-28 Thread STINNER Victor


STINNER Victor  added the comment:

Ok, I'm able to reproduce the crash using:

git clone https://github.com/llvm/llvm-project.git
cd llvm-project
mkdir _build
cd _build
cmake3 ../llvm -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" 
-DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release 
-DCMAKE_INSTALL_PREFIX=$PWD/install 
-DPYTHON_EXECUTABLE=$HOME/sources/cpython/_build/install/bin/python3
make -j4
make check-clang-python

The crash occurs in the test_access_specifiers() method defined in 
tests/cindex/test_access_specifiers.py. This test uses ctypes to call functions 
of the libclang.so dynamic library.

I reduced the test case from 4350 lines of Python code to 131 lines of Python 
which only depends on the standard library and libclang.so.

$ cd llvm-project/clang/bindings/python
$ wc -l tests/cindex/test_access_specifiers.py tests/cindex/util.py 
clang/cindex.py 
41 tests/cindex/test_access_specifiers.py
90 tests/cindex/util.py
  4219 clang/cindex.py
  4350 total

$ wc -l bug.py
131 bug.py

See attached bug.py script. Python 3.7 is fine, whereas Python 3.8 does crash:

$ python3.7 bug.py 
spelling
spelling = None
_CXString del: obj id=7f0904a6dcb0
spelling = None ---


$ python3.8 bug.py 
spelling
spelling = None
_CXString del: obj id=7f4fa6180c40
_CXString del: obj id=7f4fa6180ac0
free(): double free detected in tcache 2
Aborted (core dumped)


Notice that _CXString.__del__() is only called once in Python 3.7, but called 
twice in Python 3.8.

--
Added file: https://bugs.python.org/file48565/bug.py

___
Python tracker 

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



[issue37968] The turtle

2019-08-28 Thread Nick Timkovich


Nick Timkovich  added the comment:

Regarding #1: In Python, you may refer to a variable's name (e.g. `rt`, which 
is a function), which often has no effect in a script. In the REPL (where you 
see >>>) it is useful to inspect the object:

>>> turtle.rt


In order to call that name/function, parentheses are *required* unlike other 
languages where they are optional (Ruby). So, you don't get an error message, 
but one is not expected. Linting tools can alert you to statements that don't 
appear to have an effect.

Regarding #2: Students of the turtle could create a reusable function to draw a 
circle with the turtle and return to the starting position. It would be an 
excellent exercise with multiple solutions!

--
nosy: +nicktimko

___
Python tracker 

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



[issue37967] release candidate is not gpg signed (and missing release workflow)?

2019-08-28 Thread Ned Deily


Ned Deily  added the comment:

The description of this issue is incorrect. All the release artifacts for the 
3.8.0b3 have GPG signatures available - see 
https://www.python.org/downloads/release/python-380b3/ - like all other 
releases.  Looking at the log of the failed Travis run in 
https://github.com/pypa/manylinux/pull/333, the failure there appears to be not 
finding the release manager's public key to verify the GPG signature against.  
There is a languishing open issue about the published public keys files having 
bogus keys in it (https://github.com/python/pythondotorg/issues/1395), perhaps 
that is related.  I'll take a close look shortly.

--
assignee:  -> ned.deily

___
Python tracker 

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



[issue37918] What about an enum for open() modes?

2019-08-28 Thread Marco Sulla


Marco Sulla  added the comment:

Mh. No one is interested?

--

___
Python tracker 

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



[issue37969] urllib.parse functions reporting false equivalent URIs

2019-08-28 Thread Géry

New submission from Géry :

The Python library documentation of the `urllib.parse.urlunparse 
`_ 
and `urllib.parse.urlunsplit 
`_ 
functions states:

This may result in a slightly different, but equivalent URL, if the URL 
that was parsed originally had unnecessary delimiters (for example, a ? with an 
empty query; the RFC states that these are equivalent).

So with the  URI::

>>> import urllib.parse
>>> urllib.parse.urlunparse(urllib.parse.urlparse("http://example.com/?;))
'http://example.com/'
>>> urllib.parse.urlunsplit(urllib.parse.urlsplit("http://example.com/?;))
'http://example.com/'

But `RFC 3986 `_ states the 
exact opposite:

Normalization should not remove delimiters when their associated component 
is empty unless licensed to do so by the scheme specification.  For example, 
the URI "http://example.com/?; cannot be assumed to be equivalent to any of the 
examples above.  Likewise, the presence or absence of delimiters within a 
userinfo subcomponent is usually significant to its interpretation.  The 
fragment component is not subject to any scheme-based normalization; thus, two 
URIs that differ only by the suffix "#" are considered different regardless of 
the scheme.

So maybe `urllib.parse.urlunparse` ∘ `urllib.parse.urlparse` and 
`urllib.parse.urlunsplit` ∘ `urllib.parse.urlsplit` are not supposed to be used 
for `syntax-based normalization 
`_ of URIs. But still, both 
`urllib.parse.urlparse` or `urllib.parse.urlsplit` lose the "delimiter + empty 
component" information of the URI string, so they report false equivalent URIs::

>>> import urllib.parse
>>> urllib.parse.urlparse("http://example.com/?;) == 
urllib.parse.urlparse("http://example.com/;)
True
>>> urllib.parse.urlsplit("http://example.com/?;) == 
urllib.parse.urlsplit("http://example.com/;)
True

P.-S. — Is there a syntax-based normalization function of URIs in the Python 
library?

--
components: Library (Lib)
messages: 350663
nosy: Jeremy.Hylton, maggyero, orsenthil
priority: normal
severity: normal
status: open
title: urllib.parse functions reporting false equivalent URIs
type: behavior
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



[issue13824] argparse.FileType opens a file and never closes it

2019-08-28 Thread sebix


Change by sebix :


--
nosy: +sebix

___
Python tracker 

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



[issue37968] The turtle

2019-08-28 Thread Yehuda Katz


New submission from Yehuda Katz :

1 - turtle bug: If I don't put parenthesis at the end of a line, I don't get 
error message. Try this:

from turtle import *
fd(50); rt
done()


2 - request: Highly desirable a function that draws a circle with radius n  
AROUND THE TURTLE.

Thank you and have a wonderful day.

--
files: untitled.py
messages: 350662
nosy: Yehuda
priority: normal
severity: normal
status: open
title: The turtle
versions: Python 3.7
Added file: https://bugs.python.org/file48564/untitled.py

___
Python tracker 

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



[issue37965] CCompiler has_function displays warning

2019-08-28 Thread Maarten


Maarten  added the comment:

I have submitted a PR to github:
https://github.com/python/cpython/pull/15560

--

___
Python tracker 

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



[issue37953] Fix ForwardRef equality checks

2019-08-28 Thread Dominic Littlewood


Change by Dominic Littlewood <11dlittlew...@gmail.com>:


--
keywords: +patch
pull_requests: +15235
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/15400

___
Python tracker 

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



[issue37965] CCompiler has_function displays warning

2019-08-28 Thread Maarten


Change by Maarten :


--
pull_requests: +15233
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/15560

___
Python tracker 

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



  1   2   >