Mark Dickinson added the comment:
I realise this was opened as a joke, but I actually consider this suggestion to
be unridiculous. I've never felt comfortable with code that does if x
rather than if x != 0.0 for x a float.
What really makes this a no-go in Python is the equality between
New submission from Vajrasky Kok:
# Bug demo
TEXT_LINES = [
b'cutecat\n',
b'promiscuousbonobo\n',
]
TEXT = b''.join(TEXT_LINES)
import bz2
filename = '/tmp/demo.bz2'
with open(filename, 'wb') as f:
f.write(bz2.compress(TEXT))
with bz2.BZ2File(filename) as bz2f:
pdata =
Serhiy Storchaka added the comment:
This is documented behavior.
.. method:: peek([n])
Return buffered data without advancing the file position. At least one
byte of data will be returned (unless at EOF). The exact number of bytes
returned is unspecified.
--
nosy:
Antoine Pitrou added the comment:
I agree that having midnight evaluate to false is completely unexpected and
unintuitive. I can imagine situations where it bites people in production use
in the uncommon case that a time is exactly equal to midnight.
--
nosy: +pitrou
Marc-Andre Lemburg added the comment:
On 06.03.2014 10:30, Antoine Pitrou wrote:
Antoine Pitrou added the comment:
I agree that having midnight evaluate to false is completely unexpected and
unintuitive. I can imagine situations where it bites people in production use
in the uncommon
Roundup Robot added the comment:
New changeset 52743dc788e6 by Serhiy Storchaka in branch '3.3':
Issue #20283: RE pattern methods now accept the string keyword parameters
http://hg.python.org/cpython/rev/52743dc788e6
New changeset f4d7abcf8080 by Serhiy Storchaka in branch 'default':
Issue
Nick Coghlan added the comment:
Donald did some additional testing, and it turns out that it is
specifically midnight *UTC* that is false in boolean context. For a TZ
aware time, the false time depends on the offset (e.g. it would be false at
10 am here in Brisbane).
--
Vajrasky Kok added the comment:
Just curious, why the exact number of bytes returned is unspecified in bz2 (in
other words, n argument is ignored)? gzip uses n argument.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20856
Roundup Robot added the comment:
New changeset 52256a5861fa by Serhiy Storchaka in branch '2.7':
Issue #20283: RE pattern methods now accept the string keyword parameters
http://hg.python.org/cpython/rev/52256a5861fa
--
___
Python tracker
Serhiy Storchaka added the comment:
Because it is unspecified in io.BufferedReader.peek() and in many classes
implemented the io.BufferedReader interface.
.. method:: peek([size])
Return bytes from the stream without advancing the position. At most one
single read on the raw
Changes by Serhiy Storchaka storch...@gmail.com:
--
assignee: - serhiy.storchaka
resolution: - fixed
stage: patch review - committed/rejected
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20283
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20283
___
Michel Albert added the comment:
Here's a new patch implementing both ``subnet_of`` and ``supernet_of``.
It also contains the relevant docs and unit-tests.
--
Added file: http://bugs.python.org/file34292/net-in-net-r2.patch
___
Python tracker
Donald Stufft added the comment:
It's actually a bit worse than that Nick. It's midnight UTC, as long as the UTC
offset is Positive or Zero. This is because the way the check is implemented is
naive.
It's implemented as: Take the time portion sans the tzinfo and convert to
minutes, then take
Nick Coghlan added the comment:
I wrote up a longer post on python-ideas regarding the problems that the
current behaviour poses when it comes to inferring a correct mental model for
datetime.time():
https://mail.python.org/pipermail/python-ideas/2014-March/026647.html
As part of that, it's
Changes by Alex Gaynor alex.gay...@gmail.com:
--
nosy: +alex
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13936
___
___
Python-bugs-list mailing
Elazar Gershuni added the comment:
Is it going to be committed?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19235
___
___
Python-bugs-list
R. David Murray added the comment:
It's an enhancement, so it can only go in 3.5, and that will happen some time
after the release of 3.4.
--
nosy: +r.david.murray
versions: +Python 3.5 -Python 3.4
___
Python tracker rep...@bugs.python.org
Roundup Robot added the comment:
New changeset 064ee489982e by R David Murray in branch 'default':
whatsnew: improve PyZipFile filterfuc entry, and its docs (#19274).
http://hg.python.org/cpython/rev/064ee489982e
--
___
Python tracker
Matheus Vieira Portela added the comment:
Is this issue still going on?
--
nosy: +matheus.v.portela
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue809163
___
New submission from R. David Murray:
The 'is_private' and 'is_global' properties refer to the iana registries, but
the terms 'private network' and 'public network' do no appear in the registry
documentation. There is no way to know what these methods are going to return
other than examining
R. David Murray added the comment:
Oh, and just to make things more complicated, there are footnotes that some
protocols allow global routing for protocol-allocated addresses that are
otherwise not globally routable. It would be reasonable to for is_global to
ignore this, but it should be
Roundup Robot added the comment:
New changeset 302c8fdb17e3 by R David Murray in branch 'default':
#11558: Better message if attach called on non-multipart.
http://hg.python.org/cpython/rev/302c8fdb17e3
--
nosy: +python-dev
___
Python tracker
R. David Murray added the comment:
Committed, thanks Varun.
Note that I made two changes to your patch: added a missing space in the folded
message (your second PEP8 change), and I renamed the test method to make it
clearer what was being tested.
--
stage: - committed/rejected
Larry Hastings added the comment:
ok.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20807
___
___
Python-bugs-list mailing list
Unsubscribe:
Larry Hastings added the comment:
So you're asking that I cherry pick six revisions here?
6a1711c96fa6
fa160c8145e5
efaf12106d68
7ecee9e0dc58
10ea3125d7b8
488ccbee6ee6
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19021
Changes by Larry Hastings la...@hastings.org:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20807
___
Larry Hastings added the comment:
ok.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20831
___
___
Yury Selivanov added the comment:
Larry, so do you think we can have this one cherry-picked?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20829
___
Larry Hastings added the comment:
ok.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20832
___
___
Larry Hastings added the comment:
ok.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20829
___
___
Larry Hastings added the comment:
ok. I agree it's not critical, but on the other hand it's low-risk.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20834
___
Changes by Larry Hastings la...@hastings.org:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20834
___
Larry Hastings added the comment:
According to #19021, this actually requires six revisions:
6a1711c96fa6
fa160c8145e5
efaf12106d68
7ecee9e0dc58
10ea3125d7b8
488ccbee6ee6
Is that correct?
--
___
Python tracker rep...@bugs.python.org
Barry A. Warsaw added the comment:
On Mar 06, 2014, at 05:31 PM, Larry Hastings wrote:
Larry Hastings added the comment:
According to #19021, this actually requires six revisions:
6a1711c96fa6
fa160c8145e5
efaf12106d68
7ecee9e0dc58
10ea3125d7b8
488ccbee6ee6
Is that correct?
Yes, at least.
Larry Hastings added the comment:
ok.
(I thought the change to not-automatically-getting-sphinx was deferred?)
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20848
Larry Hastings added the comment:
ok.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20843
___
___
Larry Hastings added the comment:
ok.
--
nosy: +larry
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20850
___
Larry Hastings added the comment:
ok. And, my cherry-picking automation will automatically sort the revisions by
original checkin order.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20830
Larry Hastings added the comment:
ok.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20818
___
___
New submission from Brian Kearns:
This patch brings the pure-python datetime more in-line with the C module. We
have been running these modifications in PyPy2 stdlib for more than a year with
no issue.
Includes:
- General PEP8/cleanups
- Better testing of argument types passed to constructors
Changes by Brian Kearns bdkea...@gmail.com:
Added file: http://bugs.python.org/file34294/datetime-py33.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20858
___
Brian Kearns added the comment:
Also includes bug fixes/tests for certain rounding cases (doesn't apply to the
3.4 version).
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20858
___
Serhiy Storchaka added the comment:
Yes, that is correct.
I thought that 6a1711c96fa6 is already in RC1, that is why I hadn't opened
cherrypick issue for this. 6a1711c96fa6 is critical change because it not only
fixes one annoying warning, but it also fixes wrong order of finalization of
New submission from Terry J. Reedy:
The documentation for conditional expressions (c_exps)
http://docs.python.org/3/reference/expressions.html#conditional-expressions
and the later sections on evaluation order and operator precedence have 3
inconsistencies with each other. I believe the latter
New submission from Warren Turkal:
It would be very useful to be able to not only iterate through subnets, but
also index a subnet. For example, I would really like to be able to do the
following:
import ipaddress as ipa
net = ipa.ip_network('10.0.0.0/8')
Barry A. Warsaw added the comment:
On Mar 06, 2014, at 06:41 PM, Serhiy Storchaka wrote:
I thought that 6a1711c96fa6 is already in RC1, that is why I hadn't opened
cherrypick issue for this. 6a1711c96fa6 is critical change because it not
only fixes one annoying warning, but it also fixes wrong
R. David Murray added the comment:
I think you are looking for list(net.subnets(prefixlen_diff=2))[2]. This is
the standard Python way of going from an iterator to an indexable collection.
--
nosy: +r.david.murray
resolution: - rejected
stage: - committed/rejected
status: open -
Barry A. Warsaw added the comment:
On Mar 06, 2014, at 05:43 PM, Larry Hastings wrote:
What do you want me to do? Hold off while you determine the correct set of
changes, or proceed with these six?
I have just verified that if you take the rc2 tarball and apply these six
changesets, it 1)
Changes by Brian Kearns bdkea...@gmail.com:
Added file: http://bugs.python.org/file34296/datetime-py34-v2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20858
___
Brian Kearns added the comment:
Updated patch to v2 with another test/fix for type checking of __format__
argument to match the C module.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20858
Ned Deily added the comment:
(I thought the change to not-automatically-getting-sphinx was deferred?)
(The not-automatically-getting-sphinx change is in the default branch but it
has not been cherry-picked for 3.4.0 - and should not be, as agreed upon in
Issue20661.)
--
nosy:
Changes by Ned Deily n...@acm.org:
--
nosy: +belopolsky, lemburg, tim.peters
stage: - patch review
versions: +Python 3.3, Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20858
___
Fabian Kochem added the comment:
I just fell over the PYTHONPATH='' bit aswell. So yes, this is still valid.
--
nosy: +Fabian.Kochem
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1398781
___
Changes by Alexander Belopolsky alexander.belopol...@gmail.com:
--
assignee: - belopolsky
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20858
___
Martin v. Löwis added the comment:
I'm always in favour of using official terminology (and adjust if that changes
over time). So in this case, I agree with David's analysis, and suggest the
following specification:
- is_global returns False for all addresses where Global is False in the
IPv4
Warren Turkal added the comment:
Won't that instantiate an object for each item in the list though? For example:
list(net.subnets(prefixlen_diff=16))[499]
This take a long time. I was trying to think of a way to lazily instantiate.
For example, I don't want to create 65536 network objects
R. David Murray added the comment:
The interface you are suggesting isn't consistent with other stdlib APIs.
Perhaps it would be better to discuss this concept on pyhon-ideas...additional
methods for computing the number of subnets for a given prefix, and a different
one for constructing one
Josh Rosenberg added the comment:
_check_int_field seems needlessly complex. When you want a value that is
logically an integer (not merely capable of being coerced to an integer), you
want object.__index__, per PEP 357, or to avoid explicit calls to special
methods, use operator.index. Any
R. David Murray added the comment:
Or maybe a subnet_range method that returns a range-like object.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20860
___
STINNER Victor added the comment:
It would be very useful to be able to not only iterate through subnets, but
also index a subnet.
For your information, the IPy module supports that:
tuple(IPy.IP('192.168.1.128/31'))
(IP('192.168.1.128'), IP('192.168.1.129'))
IPy.IP('2000::/3')[2**120]
Changes by Josh Rosenberg shadowran...@gmail.com:
--
nosy: +ShadowRanger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19251
___
___
STINNER Victor added the comment:
I reopen the issue because the list option may create an huge list. Try the
IPv6 2000::/3 network :-)
--
nosy: +haypo
resolution: rejected -
status: closed - open
___
Python tracker rep...@bugs.python.org
Changes by Josh Rosenberg shadowran...@gmail.com:
--
nosy: +ShadowRanger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19915
___
___
Changes by Josh Rosenberg shadowran...@gmail.com:
--
nosy: +ShadowRanger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14373
___
___
Changes by Josh Rosenberg shadowran...@gmail.com:
--
nosy: +ShadowRanger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11107
___
___
Changes by Josh Rosenberg shadowran...@gmail.com:
--
nosy: +ShadowRanger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17170
___
___
Changes by Josh Rosenberg shadowran...@gmail.com:
--
nosy: +ShadowRanger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4356
___
___
Changes by Josh Rosenberg shadowran...@gmail.com:
--
nosy: +ShadowRanger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11406
___
___
Changes by Josh Rosenberg shadowran...@gmail.com:
--
nosy: +ShadowRanger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16465
___
___
Changes by Josh Rosenberg shadowran...@gmail.com:
--
nosy: +ShadowRanger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20632
___
___
Changes by Josh Rosenberg shadowran...@gmail.com:
--
nosy: +ShadowRanger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10977
___
___
Changes by Josh Rosenberg shadowran...@gmail.com:
--
nosy: +ShadowRanger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17862
___
___
Mark Lawrence added the comment:
What's the status of this issue? Code was committed to the default branch over
a year ago, see msg182250
--
nosy: +BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17170
Josh Rosenberg added the comment:
That's actually an argument to fix the C datetime implementation. Right now,
you get:
from decimal import Decimal as d
from datetime import datetime
datetime(d(2000.5), 1, 2)
datetime.datetime(2000, 1, 2, 0, 0)
This is wildly inconsistent;
New submission from Josh Rosenberg:
Per my comments on #20858, datetime's argument handling is inconsistent. By
using the 'i' format code, non-integer types are being coerced to int, even as
other equivalent non-integer types are accepted (sometimes in a lossy fashion).
Example:
from
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9815
___
___
Python-bugs-list
Brian Kearns added the comment:
Right, that's the behavior as it stands, so I hope this patch can be considered
independently of that issue (and if such a change is made to the C
implementation, then a corresponding change could be made in the python
implementation).
--
Josh Rosenberg added the comment:
Oh, definitely. No reason to delay this just because I have my knickers in a
twist on a tangential matter.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20858
Alexander Belopolsky added the comment:
I would like to hear from PyPy developers before we decide what to do with this
effort. Pure Python implementation is not used by CPython,
but I am afraid that people who actually use it will not appreciate the code
churn.
--
nosy:
Alexander Belopolsky added the comment:
Oh - I did not realize that this originated in PyPy.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20858
___
Brian Kearns added the comment:
Yes, I am the PyPy developer who worked on these datetime improvements there --
just finally got around to pushing them upstream.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20858
Changes by Ned Deily n...@acm.org:
--
nosy: +belopolsky, lemburg, tim.peters
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20861
___
___
Changes by Brian Kearns bdkea...@gmail.com:
--
nosy: +bdkearns
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20861
___
___
Python-bugs-list
Changes by Alexander Belopolsky alexander.belopol...@gmail.com:
--
nosy: +mark.dickinson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20861
___
Alexander Belopolsky added the comment:
I'd appreciate any pointers on how to get started
You probably know that the relevant code is in
http://hg.python.org/cpython/file/47f37a688c4c/Modules/_datetimemodule.c#l4059
The devguide should get you started:
http://docs.python.org/devguide/
Josh Rosenberg added the comment:
Thank you very much. Very helpful. I'll see about whipping up a preliminary
patch.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20861
___
Changes by Brian Kearns bdkea...@gmail.com:
Added file: http://bugs.python.org/file34297/datetime-py33-v3.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20858
___
Changes by Brian Kearns bdkea...@gmail.com:
Added file: http://bugs.python.org/file34298/datetime-py34-v3.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20858
___
Changes by Josh Rosenberg shadowranger+pyt...@gmail.com:
--
nosy: +josh.rosenberg
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18816
___
___
Changes by Hanxue Lee leehan...@gmail.com:
--
nosy: +Hanxue.Lee
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13936
___
___
Python-bugs-list
New submission from Romil Agrawal:
I just installed python 3.3.4 on os mavericks. When I changed the python
excutable in wing ide and restarted it, a dialog box appeared that said the
interpreter for python 3.3 might not exist. Can anyone help regarding this?
--
components: Library
Ned Deily added the comment:
Sorry, the Python bug tracker is not the place to ask about third-party
products. One suggestion though: make sure you entered the full (absolute)
path to the Python 3.3 executable: probably something like
/usr/local/bin/python3.3 or
93 matches
Mail list logo