[issue38080] 2to3 urllib fixer: missing fix for urllib.getproxies

2019-09-09 Thread

New submission from 徐靖 :

urllib.getproxies can be converted to urllib.request.getproxies, and their 
documentation looks the same.
but in fix_urllib.py and my real test, it is ignored. I do not know why 2to3 
does nothing. Is it a bug?

--
components: 2to3 (2.x to 3.x conversion tool)
messages: 351576
nosy: shiyuchong
priority: normal
severity: normal
status: open
title: 2to3 urllib fixer: missing fix for urllib.getproxies
type: behavior
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7

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



[issue37602] nonzero fixer problem

2019-07-15 Thread

New submission from 徐靖 :

An easy problem.
It seems like nonzero fixer can only fix definition, not usage. nonzero fixer 
cannot fix problems like below:
 a = 1
 a.__nonzero__()
And there are no cases of __nonzero__() usage in test cases from 
test_fixers.py.(all cases test only definition rename)
It might not be a bug, since in DOC it just says "rename", not "convert". (If 
it is not a bug, the doc must be considered to be kinds of confusing and should 
add additional description.)but adding this automatic transformation is really 
useful in my current work, so at least an optional fixer is needed for 2to3.
A fixer of __oct__(),__hex__() to oct(),hex() is also in need, but 2to3 lacks 
such fixer.

--
components: 2to3 (2.x to 3.x conversion tool)
messages: 348002
nosy: shiyuchong
priority: normal
severity: normal
status: open
title: nonzero fixer problem
type: behavior
versions: Python 2.7

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



[issue37608] _thread: acquire_lock, release_lock still in use while declared to be "gone" in Documentation

2019-07-17 Thread

New submission from 徐靖 :

In https://docs.python.org/3/whatsnew/3.0.html#library-changes Documentation, 
it said "Cleanup of the thread module: acquire_lock() and release_lock() are 
gone; use acquire() and release() instead."
But in 3.7, I can still find 
{"acquire_lock", (PyCFunction)(void(*)(void))lock_PyThread_acquire_lock,
 METH_VARARGS | METH_KEYWORDS, acquire_doc},
in _threadmodule.c line 217, which defined this function. And in my code ,these 
functions work, without any warning or error.
So maybe the Documentation should be changed, or the support of these functions 
should be removed, or at least add a warning.
It has no effect on code, but truly confusing and waste me an hour to search 
for why.

--
assignee: docs@python
components: Documentation
messages: 348053
nosy: docs@python, shiyuchong
priority: normal
severity: normal
status: open
title: _thread: acquire_lock,release_lock still in use while declared to be 
"gone" in Documentation
versions: Python 3.7

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



[issue37602] nonzero fixer problem

2019-07-17 Thread

徐靖  added the comment:

Got it.
I am just testing all changes in Python 3.X (in preparation for a project 
porting to 3.7 before I have permission to view the source code), and call 
__nonzero__() directly for testing. So maybe I cannot provide an example. 
I did not realize that it should not be called directly.
Still, I recommend a documentation change to explain this fact, telling readers 
the fixer will not change the usage of __nonzero__().
Thanks for your reply.

--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python

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



[issue37608] _thread: acquire_lock, release_lock still in use while declared to be "gone" in Documentation

2019-07-17 Thread

徐靖  added the comment:

I got it that it is just my misunderstanding.
Thanks.

--

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



[issue37626] Documentation:conflict between docs

2019-07-18 Thread

Change by 徐靖 :


--
assignee: docs@python
components: Documentation
nosy: docs@python, shiyuchong
priority: normal
severity: normal
status: open
title: Documentation:conflict between docs
versions: Python 3.5, Python 3.6, Python 3.7

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



[issue37626] Documentation:conflict between docs

2019-07-18 Thread

New submission from 徐靖 :

In https://docs.python.org/3/whatsnew/3.4.html#api-and-feature-removals,It is 
said "inspect.Signature: positional-only parameters are now required to have a 
valid name." 
But in 
https://docs.python.org/3/library/inspect.html?highlight=3.4#inspect.Signature, 
the actual change happened in inspect.Parameter, " Changed in version 3.4: In 
Python 3.3 Parameter objects were allowed to have name set to None if their 
kind was set to POSITIONAL_ONLY. This is no longer permitted."
So I wonder is it a mistake?

--

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