Mark Dickinson added the comment:
In case it's useful, see issue #1682 for my earlier Lehmer gcd implementation.
At the time, that approach was dropped as being premature optimisation.
--
nosy: +mark.dickinson
___
Python tracker
New submission from Serhiy Storchaka:
Currently regular expressions support on '\n' as line boundary. To meet Unicode
standard requirement RL1.6 [1] all Unicode line separators should be supported:
'\n', '\r', '\v', '\f', '\x85', '\u2028', '\u2029' and two-character '\r\n'.
Also it is
New submission from Georg Brandl:
This is implicit in the converts arguments to strings, but people might
reasonably expect that print(x, file=y) is the same as y.write(x) for strings
and bytes. This paragraph makes it clear.
--
files: print_binary.diff
keywords: patch
messages:
Robert Collins added the comment:
So this looks like its going to instantly create bugs in programs that use it.
HTTP/1.1 headers are one of:
latin1
MIME encoded (RFC2047)
invalid and working only by accident
HTTP/2 doesn't change this.
An API that encourages folk to encode into utf8 and then
Changes by theme theemat...@gmail.com:
--
versions: +Python 3.4, Python 3.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12946
___
___
Nick Coghlan added the comment:
I'm not wedded to the specific algorithm - I definitely don't consider myself
an HTTP or WSGI expert.
I do like the general idea of treating wsgistr as a serialisation format
though, as that's effectively what it is at this point.
--
STINNER Victor added the comment:
I gave two reasons why this function can fail, and one turns out to be
assumed-to-be-dead code.
If the call to PyDict_New() is never called, the test can be replaced with an
assertion.
--
___
Python tracker
STINNER Victor added the comment:
_testembed was moved from Modules to Programs but test_capi was not updated: it
still looks for test_embed in Modules.
$ ./configure --with-pydebug
$ make
$ ./python -m test -v test_capi
...
test_forced_io_encoding (test.test_capi.EmbeddingTests) ... skipped
STINNER Victor added the comment:
test_capi.patch fixes test_capi to be able to run _testembed in test_capi.
--
Added file: http://bugs.python.org/file36720/test_capi.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18093
Ned Deily added the comment:
From the initial description of the problem, it's not clear to me that there
is a problem here needing resolution in the stub launcher. I've asked for
clarification on the pip issue tracker.
--
___
Python tracker
Ned Deily added the comment:
Also, the patch causes a test failure with a framework build:
==
FAIL: test_defaults (test.test_venv.BasicTest)
--
Traceback (most
James Spurin added the comment:
fcntl doesnt seem to like the parameter you mentioned -
# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.5 (Santiago)
# /local/0/opt/python-3.4.1/bin/python
Python 3.4.1 (default, Sep 24 2014, 12:23:21)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on
Roundup Robot added the comment:
New changeset c87e00a6258d by Nick Coghlan in branch 'default':
Issue #18093: fix test_capi test skip due to _testembed move
https://hg.python.org/cpython/rev/c87e00a6258d
--
___
Python tracker rep...@bugs.python.org
Nick Coghlan added the comment:
Thanks for spotting that Victor - should be fixed by that last commit with your
change.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18093
Changes by July Tikhonov july.t...@gmail.com:
--
nosy: +july
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19717
___
___
Python-bugs-list mailing
New submission from Serhiy Storchaka:
The meaning of inline flags not at the start of regular expression is
ambiguous. Current re implementation and regex in the V0 mode enlarge the scope
to all expression. In V1 mode in regex they affect only the end of the
expression.
I propose to
New submission from Sean Dague:
The default time string is not localized for using locale specific formatting,
but is instead hardcoded to a ','.
https://hg.python.org/cpython/file/c87e00a6258d/Lib/logging/__init__.py#l483
demonstrates this.
Instead I think we should set that to the value
Antoine Pitrou added the comment:
If Python grows an optimized implementation, how about exposing it in the math
module?
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22486
Matthew Barnett added the comment:
For reference, the regex module normally considers the line ending to be '\n',
but it has a WORD flag ('(?w)') that turns on the Unicode definition of a
'word' character as well as Unicode line separator.
--
___
Mark Dickinson added the comment:
If Python grows an optimized implementation, how about exposing it in the
math module?
+1.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22486
___
Stefan Behnel added the comment:
That's what the patch does anyway. +1
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22486
___
___
Stefan Behnel added the comment:
Also see issue 22486. There is an unmerged C implementation in the old issue
1682 that would go into the math module.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22477
Antoine Pitrou added the comment:
Hmm... which patch?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22486
___
___
Python-bugs-list mailing list
Stefan Behnel added the comment:
http://bugs.python.org/file9486/lehmer_gcd.patch
(see #1682)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22486
___
Changes by Wolfgang Maier wolfgang.ma...@biologie.uni-freiburg.de:
--
nosy: +wolma
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22486
___
___
Changes by Wolfgang Maier wolfgang.ma...@biologie.uni-freiburg.de:
--
nosy: +wolma
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1682
___
___
Serhiy Storchaka added the comment:
Here is updated Mark's patch from issue1682. It is ported to 3.5, slightly
simplified and optimized (I did not touched the main algorithm still), utilized
in the fractions module, added tests and documentation.
It speeds up Stefan's fractions benchmark
Changes by Serhiy Storchaka storch...@gmail.com:
--
keywords: +patch
Added file: http://bugs.python.org/file36722/lehmer_gcd_4.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22486
___
New submission from Wolfgang Maier:
test_binop.py says that it tests binary operators on subtypes of built-in
types, but in fact largely focuses on testing its own class Rat, which simply
inherits from object and is, essentially, just a simple implementation of
fractions.Fraction.
Instead of
Stefan Behnel added the comment:
The problem is that this changes the behaviour of fractions.gcd() w.r.t.
negative numbers. It's a public function, so we should keep it for backwards
compatibility reasons, *especially* when adding a new function in the math
module.
--
components:
Stefan Behnel added the comment:
Oh, and thanks for working on it, Serhiy! :)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22486
___
___
Wolfgang Maier added the comment:
see issue22477 for a discussion of whether the behavior of fractions.gcd should
be changed or not
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22486
Wolfgang Maier added the comment:
sorry, forgot to format the link:
issue22477
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22486
___
___
Stefan Behnel added the comment:
The thing is, if we add something new in a substantially more exposed place
(the math module), then why break legacy code *in addition*? Just leaving it
the way it is won't harm anyone, really.
--
___
Python tracker
Wolfgang Maier added the comment:
I wasn't arguing for or against anything, just providing a link to the relevant
discussion.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22486
___
Serhiy Storchaka added the comment:
Well, here is a patch which keeps the same weird behavior of fractions.gcd().
--
Added file: http://bugs.python.org/file36723/lehmer_gcd_5.patch
___
Python tracker rep...@bugs.python.org
gladman added the comment:
I am inclined to think that a maths.gcd() makes sense as this would be where I
would go first to find this function. And the prospect of better performance
is attractive since the gcd is an important operation in work with number
theory algorithms.
Would it
Changes by R. David Murray rdmur...@bitdance.com:
--
stage: - resolved
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15799
___
___
Matthew Barnett added the comment:
After some thought, I've come to the conclusion that the GCD of two integers
should be negative only if both of those integers are negative. The basic
algorithm is that you find all of the prime factors of the integers and then
return the product of the
Mathieu Dupuy added the comment:
and here for the 2.7 branch
--
Added file: http://bugs.python.org/file36725/md5-sess_not_implem_27.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2202
Mathieu Dupuy added the comment:
here is the patch, for the trunk
--
versions: -Python 3.4
Added file: http://bugs.python.org/file36724/md5-sess_not_implem_cur.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2202
gladman added the comment:
On 25/09/2014 15:55, Matthew Barnett wrote:
Matthew Barnett added the comment:
After some thought, I've come to the conclusion that the GCD of two integers
should be negative only if both of those integers are negative. The basic
algorithm is that you find
New submission from Mathieu Dupuy:
When connecting to a IIS server, it replies that:
Unauthorized Server: Microsoft-IIS/7.5
WWW-Authenticate: Digest
Katherine Dykes added the comment:
Installing for a single user does solve the problem but it is not a good fix.
We have python based software where this has been an issue and a lot of our
windows users install python for all users out of habit. We have to put in the
docs to install for a
Matthew Barnett added the comment:
As it appears that there isn't general agreement on how to calculate the GCD
when negative numbers are involved, I needed to look for another way of
thinking about it.
Splitting off the sign as another factor was what I came up with.
Pragmatism beats
Stefan Behnel added the comment:
IMHO, the most straight forward way for a new gcd() function to work would be
to always, predictably return a non-negative value and let users handle all
cases themselves where a negative sign of any or all input values has a
specific meaning to them. That's
Roundup Robot added the comment:
New changeset 2a868c9f8f15 by Yury Selivanov in branch '3.4':
asyncio: Improve canceled timer handles cleanup. Closes issue #22448.
https://hg.python.org/cpython/rev/2a868c9f8f15
New changeset a6aaacb2b807 by Yury Selivanov in branch 'default':
asyncio: Improve
Martin v. Löwis added the comment:
Katherine: Python 2.6 is no longer maintained. If you are talking about a
different Python version, please submit a new bug report. Please state
1. what you did
2. what happened
3. what you expected to happen instead
(personally, I'm not willing to invest time
Katherine Dykes added the comment:
It is indeed 2.7 with the issues; the software we are building on (OpenMDAO)
does not support 3.x - I'll go ahead and submit a new issue for 2.7
--
___
Python tracker rep...@bugs.python.org
New submission from Katherine Dykes:
This is a new issue meant to resurrect Issue 5459. When Python 2.7.x (and
2.6.x before that) are installed for all users, then 'msvcr90.dll' is not
created in the installation directory. It does if you install for a single
user. However, many Windows
Mark Dickinson added the comment:
IMHO, the most straight forward way for a new gcd() function to work would
be to always, predictably return a non-negative value.
Yes. Any new gcd implementation (in the math module, for example) should
definitely return the unique nonnegative gcd of its
Mark Dickinson added the comment:
On second thoughts, I'm withdrawing this part of the proposal:
3. Remove fractions.gcd in Python 3.6.
That just falls under 'gratuitous breakage'. Instead, we should modify the
`fractions.gcd` docstring to point users to math.gcd.
--
gladman added the comment:
On 25/09/2014 17:02, Matthew Barnett wrote:
Matthew Barnett added the comment:
As it appears that there isn't general agreement on how to calculate the GCD
when negative numbers are involved, I needed to look for another way of
thinking about it.
Splitting
Mark Dickinson added the comment:
Or would it co-exist with fractions.gcd(), with the 'less surprising'
semantics that are under discussion in the 'GCD in Fractions' thread?
Yes, exactly. math.gcd will always give a nonnegative result. The output of
fractions.gcd remains unchanged for
Mark Dickinson added the comment:
Serhiy: thank you! I've been meaning to update that patch for a long time, but
hadn't found the courage or time to face the inevitable bitrot.
--
___
Python tracker rep...@bugs.python.org
gladman added the comment:
On 25/09/2014 17:44, Mark Dickinson wrote:
Mark Dickinson added the comment:
IMHO, the most straight forward way for a new gcd() function to work would
be to always, predictably return a non-negative value.
Yes. Any new gcd implementation (in the math
New submission from James Paget:
The operator -= modifies a frozenset (this should not be possible),
instead of signaling a TypeError. Contrast with the += operator.
f=frozenset([1,2])
f
frozenset([1, 2])
f -= frozenset([1])
f
frozenset([2])
f -= frozenset([2])
f
frozenset([])
f +=
Ezio Melotti added the comment:
This doesn't modify f, it replaces it with a new frozenset:
f = frozenset({1, 2})
f
frozenset({1, 2})
id(f)
3071990668
f -= frozenset({1})
f
frozenset({2})
id(f)
3066719340
Notice how the two ids are different.
In other words,
f -=
Terry J. Reedy added the comment:
I strongly agree with Mark's revised plan:
1. add a fast C-coded math.gcd returning the actual greatest (in normal ordered
int sense) common divisor;
2. use this for reduction of fractions in the fractions module to speed up
operations on fractions.
3. revised
Stefan Behnel added the comment:
+1 for Mark Terry, just for the record
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22477
___
___
Changes by Akira Li 4kir4...@gmail.com:
--
nosy: -akira
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22477
___
___
Python-bugs-list mailing list
Ronald Oussoren added the comment:
I'm not convinced that this is a bug in python. __PYVENV_LAUNCHER__ is an
implementation detail of CPython used in the implementation of the pyvenv
functionality.
I consider using this undocumented environment variable in distlib as a bug in
distlib, which
Ezio Melotti added the comment:
Is this still an issue?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15279
___
___
Python-bugs-list mailing
Matthew Barnett added the comment:
+1 for leaving it to the user to make it negative if so desired.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22477
___
Changes by Ned Deily n...@acm.org:
--
nosy: +orsenthil
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22496
___
___
Python-bugs-list mailing list
Robert Collins added the comment:
FWIW we probably need to capture the original unaltered URL somewhere, but also
ensure that PATH_INFO is always a relative path.
One should be able to implement a proxy in WSGI (because thats just another
specialised app), and doing that today requires
Changes by Ned Deily n...@acm.org:
--
nosy: +steve.dower, zach.ware
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22497
___
___
Python-bugs-list
Changes by Ned Deily n...@acm.org:
--
nosy: +vinay.sajip
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22494
___
___
Python-bugs-list mailing list
Steve Dower added the comment:
When you install for all users, the msvcr90.dll is also installed for all users
and should appear in your System32/SysWOW64 directory.
What sort of problems are you facing? Compiled DLLs/pyds that are loaded into a
running Python process should reuse the already
gladman added the comment:
On 25/09/2014 17:44, Mark Dickinson wrote:
Mark Dickinson added the comment:
IMHO, the most straight forward way for a new gcd() function to work would
be to always, predictably return a non-negative value.
Yes. Any new gcd implementation (in the math
Charles-François Natali added the comment:
Let's try with this instead:
from socket import socket, SO_SNDBUF, SOL_SOCKET
s = socket()
s.getsockopt(SOL_SOCKET, SO_SNDBUF)
--
___
Python tracker rep...@bugs.python.org
Berker Peksag added the comment:
This has been fixed as part of issue 16191:
https://hg.python.org/cpython/rev/ac30a1b1cf17#l1.2780
--
nosy: +berker.peksag
resolution: - out of date
stage: patch review - resolved
status: open - closed
___
Changes by Berker Peksag berker.pek...@gmail.com:
--
stage: - needs patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19642
___
___
Mathieu Dupuy added the comment:
I filled the bug in a hurry. You have to read
when connecting to a IIS for a protected resource and replying with 401 for an
authentication challenge, it replies this [...]
--
___
Python tracker
Serhiy Storchaka added the comment:
Now I spent more time on the patch. Changes in updated patch:
* Removed code duplication for odd and even k.
* Temporary buffers c and d no longer allocated on every iteration.
* Long result now compacted. No longer unused allocated size.
* Added checks for
Joshua Moore-Oliva added the comment:
Hm. That sounds like you won't actually be interoperable with other
asyncio-using code.
asyncio code can be interoperated with by spinning off an asyncio coroutine
that on completion calls a callback that reschedules a non-asyncio coroutine.
I assume
Joshua Moore-Oliva added the comment:
Also - should I close this issue now that a patch has been committed?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22448
___
Yury Selivanov added the comment:
Hm, strange, usually roundup robot closes issues. Anyways, closed now. Thanks
again, Joshua.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22448
Robert Collins added the comment:
Oh, also - while its tempting to say that it doesn't matter whether we take the
urls host portion, or the host header or the server name - it does. Deployments
that look like:
LB/Firewall - backend container - WSGI app
are likely to have assumptions within
Robert Collins added the comment:
So I guess the API concern I have is that there are two cases:
- common spec compliant - US-ASCII + RFC2047
- dealing with exceptions - UTF8 or otherwise
The former totally makes sense as a codec, though the current email
implementation of it isn't quite a
Stefan Behnel added the comment:
Sorry for reopening this, but I found one more thing. Division is pretty heavy
on PyLong objects and there doesn't seem to be an internal optimisation for
division by 1 and -1. Since many Fraction input values can already be
normalised for some reason, the
Ronald Oussoren added the comment:
On 25 sep. 2014, at 19:58, Ronald Oussoren rep...@bugs.python.org wrote:
Ronald Oussoren added the comment:
I consider using this undocumented environment variable in distlib as a bug
in distlib, which should be fixed
Speaking of which... That
Henri Salo added the comment:
CVE-2014-7185
--
nosy: +Henri.Salo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21831
___
___
Python-bugs-list
Vinay Sajip added the comment:
I consider using this undocumented environment variable in distlib
as a bug in distlib, which should be fixed there.
Well, let me explain why it's used: when Python = 3.3 starts up, it looks for
a pyvenv.cfg file proximate to sys.executable. If found, that
Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22417
___
___
Python-bugs-list mailing list
Changes by Sai Krishna saikrishna17...@gmail.com:
--
nosy: +saikrishna17394
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21991
___
___
Changes by Claudiu Popa pcmantic...@gmail.com:
--
stage: - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22080
___
___
Claudiu Popa added the comment:
Is there something I can do to move this forward?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21518
___
___
Claudiu Popa added the comment:
Looks good. Could you add a test that reproduces the intended behaviour?
--
nosy: +Claudiu.Popa
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22141
___
New submission from Nikolaus Rath:
I received a bugreport due to a crash when calling SSLObject.send(). The
traceback ends with:
[...]
File
/usr/local/lib/python3.4/dist-packages/dugong-3.2-py3.4.egg/dugong/__init__.py,
line 584, in _co_send
len_ = self._sock.send(buf)
File
Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20320
___
___
Python-bugs-list mailing list
Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20505
___
___
Python-bugs-list mailing list
Antoine Pitrou added the comment:
Hmm... this sounds like issue8240, except that it should be fixed in 3.4...
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22499
___
Changes by Antoine Pitrou pit...@free.fr:
--
type: crash - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22499
___
___
Python-bugs-list
New submission from Tristan Fisher:
It's my understanding that giving the action=store_true to an argument in
argparse defaults to False. When using non-double-dashed/positional arguments,
the argument resorts to True (even if explicitly marked default=False).
I've attached a minimal
Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21166
___
___
Python-bugs-list mailing list
Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20671
___
___
Python-bugs-list mailing list
paul j3 added the comment:
A 'store_true' action takes 0 arguments. In effect `nargs=0`.
With an `optional` (flagged) argument, the default `False` is used if the flag
is absent, and set to `True` when the flag is encountered (its Action
`__call__` function is run).
A `positional` is
Changes by Martin Panter vadmium...@gmail.com:
--
nosy: +vadmium
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22474
___
___
Python-bugs-list
Senthil Kumaran added the comment:
Yes, urllib2 does not have any support for NTML based authentication. And it
is a long pending feature request too.
For 2.7, the best way to handle this might be, instead of crashing on
WWW-Authenticate: Negotiate, which is a valid response from IIS (1). It
100 matches
Mail list logo