New submission from Nathan Ringo:
On Arch Linux, running `python2 -c import platform; print
platform.linux_distribution()'
Before patch: ('', '', '')
After patch: ('arch', 'Arch', 'Linux')
This matches the Python 3 behavior:
`python3 -c import platform; print(platform.linux_distribution())'
Berker Peksag added the comment:
Thanks for the report. This is a duplicate of issue 20454.
--
nosy: +berker.peksag
resolution: - duplicate
stage: - resolved
status: open - closed
superseder: - platform.linux_distribution() returns empty value on Archlinux
and python 2.7
Changes by Berker Peksag berker.pek...@gmail.com:
--
nosy: +Nathan Ringo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20454
___
___
Nathan Ringo added the comment:
The problem is, existing software (Ansible) relies on linux_distribution()
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20454
___
Tim Graham added the comment:
This changed caused a problem in Django's test suite (bisected to
0d0989359bbb0).
File /home/tim/code/django/django/db/models/options.py, line 709, in
_populate_directed_relation_graph
all_models = self.apps.get_models(include_auto_created=True)
TypeError:
On 6/6/2015 5:24 AM, Joonas Liik wrote:
Perhaps its just me, but it seems to me that this release is mighty
picky about annotations.
More specifically everything is fine in the interactive interpreter but
the same code won't fly when run as a file.
example:
def some_function(my_arg:my random
In a message of Sat, 06 Jun 2015 18:28:29 +, John McKenzie writes:
Laura and Gary, thank you for your replies. I have three physical
buttons connected to a Kade device emulating a keyboard. These buttons
control an LED light strip. So there is no screen, so a GUI did not cross
my mind. I
New submission from Ivan Bykov:
Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:44:40) [MSC v.1600 64 bit
(AMD64)] on win32
Type copyright, credits or license() for more information.
SM_CYSCREEN = 1
from ctypes import windll
GetSystemMetrics = windll.user32.GetSystemMetrics
On Sat, Jun 6, 2015 at 10:10 AM, Dennis Lee Bieber
wlfr...@ix.netcom.com wrote:
That is in the same class as the lunar lander game on my college
mainframe...
It did not do validity checking of inputs, with the result that one
could do
-10 lbs thrust at 180 degrees
and GAIN
Rustom Mody rustompm...@gmail.com wrote:
On Saturday, June 6, 2015 at 10:20:49 AM UTC+5:30, Steven D'Aprano wrote:
On Sat, 6 Jun 2015 01:20 pm, Rustom Mody wrote:
As a parallel here is Dijkstra making fun of AI-ers use of the word
'intelligent'
Perhaps its just me, but it seems to me that this release is mighty picky
about annotations.
More specifically everything is fine in the interactive interpreter but the
same code won't fly when run as a file.
example:
def some_function(my_arg:my random annotation)-my random return type
On Friday 5 Jun 2015 09:17 CEST, Cecil Westerhof wrote:
I was already thinking along those lines. I made it:
def find(directory, to_match):
to_match = to_match.lower()
results = []
for dirpath, dirnames, filenames in os.walk(expanduser(directory)):
for filename in filenames:
On Friday 5 Jun 2015 01:04 CEST, Cameron Simpson wrote:
On 04Jun2015 13:09, Michael Torrie torr...@gmail.com wrote:
Why not use Python for what it's good for and say pipe the results
of find into your python script? Reinventing find poorly isn't
going to buy you anything.
And several
Changes by Berker Peksag berker.pek...@gmail.com:
--
stage: patch review - commit review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24391
___
Serhiy Storchaka added the comment:
The glob module is not affected because it ignores all OSErrors (including
Permission denied and Too many levels of symbolic links).
import glob
glob.glob('**/*', recursive=True)
['dir2/file1', 'dir2/file2', 'dir2/dir3', 'dir1/file1', 'dir1/file2']
There
Changes by Antoine Pitrou pit...@free.fr:
--
priority: normal - release blocker
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18003
___
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
keywords: +patch
Added file: http://bugs.python.org/file39637/threading_objects_reprs.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24391
New submission from Serhiy Storchaka:
Proposed patch adds makes reprs of threading objects Semaphore,
BoundedSemaphore, Event, and Barrier expose their public states. This will help
for debugging.
Examples:
Semaphore: 10 at 0xb710ec8c
BoundedSemaphore: 7/10 at 0xb6ff1d6c
unset Event at
New submission from Padmanabhan Tr:
I have attached the python sequence my comments. I use Python version 3.4.2
I guess a bug need be corrected
--
components: Regular Expressions
files: bug_a
messages: 244897
nosy: Padmanabhan.Tr, ezio.melotti, mrabarnett
priority: normal
severity:
The !find version is C code optimised to do one thing, find files in
your directory structure, which happens to be what you want to do.
General regular expression matching is harder.
Carl Friedrich Bolz investigated regular expression algorithms and their
implementation to see if this is the sort
In a message of Fri, 05 Jun 2015 11:15:31 +0200, Christian Gollwitzer writes:
Am 05.06.15 um 11:03 schrieb Alexis Dubois:
Anyone else for an idea on that?
Well, it is a crash on exit. Looks like a memory error inside of PyQT.
If you've got the time, you could run it inside of a debugger, or
Antoine Pitrou added the comment:
+1. The patch looks good to me.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24391
___
___
Python-bugs-list
Brett Cannon added the comment:
While I like the concept, I don't like the reprs where the type is not the
first thing listed, e.g., set Event not having Event first. The default
repr and typical practice of having the type come first makes my brain
initially read that repr as a set of Events
Serhiy Storchaka added the comment:
This is for consistency with reprs of lock objects (issue21137):
unlocked _thread.lock object at 0xb6f2b188
locked _thread.lock object at 0xb6f2b188
unlocked _thread.RLock object owner=0 count=0 at 0xb6f2b0b0
locked _thread.RLock object owner=-1219680512
Antoine Pitrou added the comment:
I'd like to see this in 3.5. This is a no-brainer improvement and has very
little chance of breaking anything compared to a new OrderedDict implementation.
--
nosy: +larry
versions: +Python 3.5
___
Python tracker
Stefan Behnel added the comment:
(Copying my review comment here so that it doesn't get lost as it's more of a
general design thing than a specific review comment.)
Having Future know and deal with asyncio seems wrong to me. asyncio should be
able to deal *somehow* with a Future that is being
On Sat, 6 Jun 2015 07:24 pm, Joonas Liik wrote:
Perhaps its just me, but it seems to me that this release is mighty picky
about annotations.
More specifically everything is fine in the interactive interpreter but
the same code won't fly when run as a file.
example:
def
Ram Rachum added the comment:
I'm seeing a similar problem with `move_to_end` and its `last` keyword argument.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24394
___
New submission from Hasan Diwan:
The webbrowser module uses getopt, which needs to be ripped out and replaced
with argparse. The attached file does just this.
--
components: Library (Lib)
files: webbrowser.py
messages: 244913
nosy: Hasan Diwan, georg.brandl
priority: normal
severity:
Ram Rachum added the comment:
A problem I just realized with Brian's 2-line implementation of `filter`: It
doesn't work for iterables which aren't sequences, since it attempts to exhaust
the iterable twice. So if you have a non-sequence you'll have to make it into a
sequence first.
Changes by Berker Peksag berker.pek...@gmail.com:
--
nosy: +berker.peksag
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24255
___
___
Larry Hastings added the comment:
I'll allow it. But I agree with Brett, I really would prefer that the type be
the first thing in the repr. I'd rather fix the lock objects than compound our
error.
--
___
Python tracker rep...@bugs.python.org
Serhiy Storchaka added the comment:
bz2 will gain great benefit from such optimization too.
Microbenchmark results:
$ ./python -m timeit -s import gzip -- f=gzip.GzipFile('words.gz', 'r')
for line in f: pass
2.7: 10 loops, best of 3: 374 msec per loop
3.2: 10
Serhiy Storchaka added the comment:
Would following reprs good?
Event: set at 0xb710ec8c
Event: unset at 0xb710ec8c
(what is better: unset or clear?)
Should the repr contain the module name (threading.Event: set at 0xb710ec8c)?
--
___
Python
Eric Snow added the comment:
This has been fixed in issue24368. The fix came just after the beta 2 release.
--
resolution: - duplicate
stage: - resolved
status: open - closed
superseder: - Some C OrderedDict methods need to support keyword arguments.
Eryn Wells added the comment:
Hi. This is my first issue, but I'd be willing to have a go at updating this
module. Do either of you have specific ideas about what changes you want here?
My thought was to import logging, create a logger object, and start by
replacing all the self.debuglevel
you can use yield structure in python for multiple return. ex:
def func(a):
yield a*2
print a*2
yield a*3
print a*3
...
data = func(5) -- data = (10,15,... )
On Wed, Jun 3, 2015 at 1:57 AM, fl rxjw...@gmail.com wrote:
Hi,
I just see the tutorial says Python can return
Berker Peksag added the comment:
Thanks!
A few comments:
* New features like this can only go into Python 3.6 (the default branch)
* The CLI is partially tested (see Lib/test/test_webbrowser.py). You'll need to
add additional tests (e.g. add tests for the -t and -h options)
* It would be nice
New submission from Madison May:
I often find myself trying to access a file relative to the module I'm working
on. When this occurs, I'll often use something like the following:
```
os.path.abspath(os.path.join(os.path.dirname(__file__), data/resource.pkl))
```
I have good reason to believe
New submission from Ram Rachum:
Python 3.5.0b2 (v3.5.0b2:7a088af5615b, May 31 2015, 06:22:19) [MSC v.1900 64
bit (AMD64)] on win32
Type help, copyright, credits or license for more information.
import collections
The EuroPython website supports buying tickets for other people
(friends, colleagues, etc.). As a result, it is necessary to “assign”
the tickets you buy to either yourself or someone else. The assignment
process is explained below.
Please tell us your preferences
---
Antoine Pitrou added the comment:
I think the module name is useful, since there are also multiprocessing events
and semaphores. Also, Event is a fairly generic name which may be used in other
contexts (e.g. GUI libraries).
set and unset sound good to me.
--
Serhiy Storchaka added the comment:
Here is updated patch. Now the repr always starts with the qualified class name.
threading.Semaphore: 10 at 0xb710ec8c
threading.BoundedSemaphore: 7/10 at 0xb6ff1d6c
threading.Event: unset at 0xb710ec8c
threading.Event: set at 0xb710ec8c
threading.Barrier:
Mark Lawrence added the comment:
This strikes me as pointless code churn.
--
nosy: +BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24395
___
yield structure can able to you that return list of return by nest in
function. for example you want send a value as enter value to function and
wanna after some calculate send value as return data. 2 way for this :
a) send data as a list
b) send data with yield
example:
a)
def func(a):
I need some help/assistance with using the python import math function. Like
I am trying to do a = math.sqrt(1000)
a.sqrt
but it fails. what am I doing wrong? Thanx for anyone's help.
--
https://mail.python.org/mailman/listinfo/python-list
On 2015-06-06 23:03, Steve Burrus wrote:
I need some help/assistance with using the python import math function. Like
I am trying to do a = math.sqrt(1000)
a.sqrt
but it fails. what am I doing wrong? Thanx for anyone's help.
In what way does it fail?
If it printed an error
Martin Panter added the comment:
There is also pkgutil.get_data(), but that returns the file contents rather
than file path, which has rarely been useful to me.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24396
Christie added the comment:
I can't seem to get test_no_FatalError_infinite_loop to fail - I tried
reverting the fix that this was verifying, but the test still passed and no
infinite loop to be seen. I'm wondering if this is because I can't reproduce it
on a mac.
--
ppperry added the comment:
Another example of this overzealous removing is when you create a module named
rpc, run, RemoteDebugger, or bdb.
For example (in this environment, a file in the current directory named rpc.py
exists and refers to the undefined name bar):
import rpc
Traceback (most
Martin Panter added the comment:
See also Issue 23738 and PEP 457 for fixing the documentation instead, possibly
something like truncate(size=None, /). Also, Issue 17003 has changed some of
the keywords to be more consistent, making parts of this patch incorrect.
--
nosy: +vadmium
Christie added the comment:
run_python and spawn_python are basically the same, I need to reconcile those.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24033
___
Christie added the comment:
@ncoghlan I've taken the test.rst changes from the previous diff and reviewed
them against the latest script_helper (including updates from issue24033).
Nothing had fallen behind, but I've added what was missing.
* I've realized that spawn_python and the helper
Changes by Berker Peksag berker.pek...@gmail.com:
--
stage: - patch review
versions: +Python 3.6
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23981
___
ppperry added the comment:
Is there any reason why the end of the traceback, rather then just the
beginning, needs to be pruned in the first place?
Additionally, the search for pdb in the tb method will still undesirably
prune the traceback if someone invents there own buggy debugger that
Martin Panter added the comment:
This feature could be handy for finding test files in test suites. However I
don’t think the abspath() step is necessary. We kind of want a urljoin() for OS
paths, that automatically removes the current file name. As a new feature I
think it would be too late
On Sun, Jun 7, 2015 at 4:28 AM, John McKenzie dav...@bellaliant.net wrote:
It turns out Tkinter is installed on Raspian and my Pi has it. Typing
import tkinter into the Python interpreter gave me an error, then I
corrected my spelling. The T should be upper case. No errors with import
On 06Jun2015 15:03, Steve Burrus steveburru...@gmail.com wrote:
I need some help/assistance with using the python import math function. Like
I am trying to do a = math.sqrt(1000)
a.sqrt
but it fails. what am I doing wrong? Thanx for anyone's help.
Please post a tiny but
quot;To run any command at the system shell, simply prefix it with !quot;
See: https://ipython.org/ipython-doc/dev/interactive/tutorial.html--
https://mail.python.org/mailman/listinfo/python-list
In a message of Sat, 06 Jun 2015 15:42:27 -0700, Albert-Jan Roskam via Python-l
ist writes:
quot;To run any command at the system shell, simply prefix it with !quot;
See: https://ipython.org/ipython-doc/dev/interactive/tutorial.html
Please don't top post.
2. He knows this. He's doing this for
Martin Panter added the comment:
If you diffed your patch from a public revision in the main repository, there
should be a nice “Review” link. Anyway, here are some comments on
issue18576.patch:
+.. function:: assert_python_ok(*args, **env_vars)
+
+ Runs the interpreter with *args* and
R. David Murray added the comment:
The pkguitil.get_data function is the *right* way to access package-relative
data (because in the general case the data may not be on the file system), and
IMO it would not be a good idea to make it easier to do things the wrong way.
Any deficiencies with
R. David Murray added the comment:
Your emendation doesn't seem to do anything differently (logic wise) than the
original code. Unless I am missing something, it is pointless to track the
length of the buffer separately from the contents of the buffer. The buffer
knows its length.
New submission from Ben Darnell:
The new collections.abc.Awaitable ABC relies on __instancecheck__, which makes
it incompatible with functools.singledispatch (singledispatch works based on
args[0].__class__; any instance-level information is discarded). This surprised
me because the first
On Sun, 7 Jun 2015 03:57 am, fl wrote:
Excuse me. I input the following according to your idea, but I do not
understand how to use it from the echo. It does not show how to use
the multiple output results. I am a new Python user. Please give a little
more explanation if you could.
Nick Coghlan added the comment:
As far as using docstrings for the online docs goes, there are some useful
Sphinx add-ons that we've never enabled for the main Python docs (like autodoc,
blockdiag, seqdiag) that could be good options to have available. For autodoc
in particular, we prefer to
Tnx Steven,
You are right completly.I try more subtilize
thanks for your hint.
On Sun, Jun 7, 2015 at 10:03 AM, Steven D'Aprano st...@pearwood.info
wrote:
Hi Amir, and welcome!
On Sun, 7 Jun 2015 02:38 am, Amir Arsalan wrote:
you can use yield structure in python for multiple return. ex:
Changes by Ned Deily n...@acm.org:
--
nosy: +orsenthil
stage: - patch review
versions: +Python 3.6 -Python 3.2, Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24393
___
On Sat, 6 Jun 2015 03:32 pm, Rustom Mody wrote:
On Saturday, June 6, 2015 at 10:20:49 AM UTC+5:30, Steven D'Aprano wrote:
On Sat, 6 Jun 2015 01:20 pm, Rustom Mody wrote:
As a parallel here is Dijkstra making fun of AI-ers use of the word
'intelligent'
On Sat, 6 Jun 2015 03:28 pm, Rustom Mody wrote:
There was a list: [1,2,3]
At some point that list is found to be(come) [1,2,3,4]
They dont look same to me.
When you pour water into an empty bottle, does it turn into a different
bottle?
When you append items to a list (or remove them), it is
On 06/06/2015 12:28 PM, John McKenzie wrote:
Laura and Gary, thank you for your replies. I have three physical
buttons connected to a Kade device emulating a keyboard. These buttons
control an LED light strip. So there is no screen, so a GUI did not cross
my mind. I thought it made sense
On Saturday, June 6, 2015 at 11:27:29 PM UTC+5:30, fl wrote:
On Saturday, June 6, 2015 at 9:39:19 AM UTC-7, Amir Arsalan wrote:
you can use yield structure in python for multiple return. ex:
def func(a):
yield a*2
print a*2
yield a*3
print a*3
...
Hi Amir, and welcome!
On Sun, 7 Jun 2015 02:38 am, Amir Arsalan wrote:
you can use yield structure in python for multiple return. ex:
def func(a):
yield a*2
print a*2
yield a*3
print a*3
...
data = func(5) -- data = (10,15,... )
That's actually wrong. If you run:
New submission from Étienne Buira:
Amount of data the server could not send back is not a reliable indication on
how much data it received.
--
components: Tests
files: test_asynchat_check_received_len_if_received_len_matters.diff
keywords: patch
messages: 244922
nosy: eacb
priority:
On Saturday, June 6, 2015 at 9:39:19 AM UTC-7, Amir Arsalan wrote:
you can use yield structure in python for multiple return. ex:
def func(a):
yield a*2
print a*2
yield a*3
print a*3
...
data = func(5) -- data = (10,15,... )
On Wed, Jun 3, 2015 at 1:57 AM,
Christie added the comment:
Created issue24398 for updating test_capi.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9517
___
___
New submission from Christie:
As described in Issue9517, many test modules do not make use of the helpers in
script_helpers.py to invoke the python interpreter in a subprocess. Issue9517
will be broken down into several smaller issues so we can address smaller
change sets.
This issue is to
Étienne Buira added the comment:
Patch was for 2.7
Hunks about no_proxy are also relevant for other branches.
--
versions: +Python 3.2, Python 3.3, Python 3.4, Python 3.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24393
Hi. I'm a newbie in python. But I want embed it in my C program.
There is such method of my class:
@staticmethod
def install_instr_callback(callback):
# set hook for every change of PC
m68k.set_instr_hook_callback(callback)
And in my C code there is such callback function:
static
Laura and Gary, thank you for your replies. I have three physical
buttons connected to a Kade device emulating a keyboard. These buttons
control an LED light strip. So there is no screen, so a GUI did not cross
my mind. I thought it made sense as it is easily done by other scripting
80 matches
Mail list logo