Paul Czyzewski added the comment:
oops, if "k=400"
--
___
Python tracker
<https://bugs.python.org/issue33494>
___
___
Python-bugs-list mailing list
Uns
Paul Czyzewski added the comment:
or, for a minimal doc change, change this sentence:
"For example, the relative weights [10, 5, 30, 5] are equivalent to the
cumulative weights [10, 15, 45, 50],"
to:
"For example, the relative call 'weights[10, 5, 30, 5]' is equivalen
Paul Goins added the comment:
If we consider this to be the new normal... What about increasing the timeout
to accomodate? From what I could gather, builds were running around 13 minutes
or so before the changes, so the timeout wasn't much above actual exec time to
begin with. Maybe
Paul Moore added the comment:
I would strongly prefer the docs to be changed to match the implementation
rather than the other way round. However, I don't see the use case for this -
what case sensitive filesystem would anybody be building the Windows version of
Python on?
I
Paul Moore added the comment:
OK, having re-read the PR, I'm fine with applying it as is, too.
--
___
Python tracker
<https://bugs.python.org/issue31569>
___
___
Paul Moore added the comment:
New changeset f1502d097c29b266a5748312ee2451a2d6ac0af6 by Paul Moore (Stefan
Grönke) in branch 'master':
bpo-31569: correct PCBuild/ case to PCbuild/ in build scripts and docs (GH-3711)
https://github.com/python/cpyt
Paul Moore added the comment:
I believe that's the case, although I'm somewhat surprised by the nature of the
error. I'm just checking diffs at the moment.
But VS 2015 is the officially supported compiler for 3.6.
--
___
Python
Paul Moore added the comment:
Standard Windows behaviour, in my experience, is inherited permissions.
IMO, the current behaviour is correct - we default to an OS-managed secure
location for system wide installs, and a user-modifiable location for user
installs. If the person doing the
Paul Moore added the comment:
Definitely. The reason it uses uncompressed files is simply an oversight on my
part - I hadn't realised the default for zipfile was uncompressed.
--
___
Python tracker
<https://bugs.python.org/is
Paul Moore added the comment:
New changeset d87b105ca794addf92addb28293c92a7ef4141e1 by Paul Moore (Zhiming
Wang) in branch 'master':
bpo-31638: Add compression support to zipapp (GH-3819)
https://github.com/python/cpython/commit/d87b105ca794addf92addb28293c92
Change by Paul Moore :
--
assignee: -> paul.moore
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python
New submission from Paul Pinterits :
The [descriptor
howto](https://docs.python.org/3/howto/descriptor.html#invoking-descriptors)
states:
"For example, obj.d looks up d in the dictionary of obj. If d defines the
method __get__(), then d.__get__(obj) is invoked [...]"
This is not
Paul Pinterits added the comment:
I'm aware that descriptors have to exist on the class in order to work. The
point is that the documentation states "If d defines the method __get__(), then
d.__get__(obj) is invoked" (where d is obj.d), which is
Paul Pinterits added the comment:
If we take this class:
class Obj:
@property
def d(self):
print('called')
And we access Obj.d:
_ = Obj.d
According to the docs, the following should happen:
# obj.d looks up d in the dictionary of obj
d = Obj.__dict__['d
Paul Moore added the comment:
The "backports" module you refer to as being in site-packages is not shipped
with the standard library, it's a 3rd party addon that presumably you installed
yourself. You'll need to let us know what you did to install it.
You say you manipula
Paul Moore added the comment:
> I did use `pip` to install packages as you'll see in the screenshot.
Sorry, I don't see any pip commands. Please could you include sample commands
inline as text, and not as screenshots, as attached files aren't accessible
from emails...
A
Paul Moore added the comment:
My feeling is still that it's an issue with things (i.e., imports) happening
before you adjust sys.path. But without seeing actual code that reproduces the
issue, there's no way of being sure. And if that is what's going on, it
wouldn't b
Paul Moore added the comment:
Also, one of the packages installed creates a file
configparser-3.5.0-py2.7-nspkg.pth
This has some very suspicious looking content:
import sys, types, os;has_mfs = sys.version_info > (3, 5);p =
os.path.join(sys._getframe(1).f_locals['sitedir'],
paul j3 added the comment:
And the actual exit is via `parse.error` and `parse.exit`, which are documented
in 16.4.5.9.
When run interactively in Ipython, exits (including the help) are captured and
displayed with:
In [896]: parser.parse_args()
usage: ipython3 [-h] [--one | --two | --six
paul j3 added the comment:
As documented in many other issues, the usage formatter is brittle. It formats
the individual usages, joins them into a string. Then if too long to fit on one
line it tries t split into actions, etc. This split produces an assertion
error if there are '
paul j3 added the comment:
I've changed your example a bit to clarify some points.
parser.add_argument('n', type=int)
group = parser.add_mutually_exclusive_group()
group.add_argument("-v", "--verbose", action="store_true")
group.add
paul j3 added the comment:
In a recent stackoverflow question a user wanted this optional-subparsers
ability in Python 2.7.
https://stackoverflow.com/questions/46667843/how-to-set-a-default-subparser-using-argparse-module-with-python-2-7
Short of modifying the _parse_known_args method, the
Paul G added the comment:
This seems very useful to me. I very frequently advise people *against* using
dateutil.parser (despite my conflict of interest as maintainer of dateutil) for
well-known formats, but the problem frequently comes up of, "what should I do
when I have date creat
Change by Paul Ganssle :
--
keywords: +patch
pull_requests: +4145
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue31222>
___
___
Py
Paul Ganssle added the comment:
Some time ago this was fixed in pypy3:
https://bitbucket.org/pypy/pypy/issues/2635/datetimereplace-always-returns
I made a PR fixing this for `datetime`, `date` and `time`.
--
___
Python tracker
<ht
Paul Moore added the comment:
I'm not actually sure what the proposal here is. Are we suggesting that all
Python's means of terminating a process should use the same exit code?
Note that doing so would be a backward compatibility break, as os.kill() is
documented as having the beha
Paul Moore added the comment:
The docs for the curses module say "While curses is most widely used in the
Unix environment, versions are available for Windows, DOS, and possibly other
systems as well." This is the only mention of platform support I can see.
It might be worth
Paul Moore added the comment:
@elguavas the problem is, no-one has proposed a patch. There's not likely to be
much movement on this until someone provides one.
--
___
Python tracker
<https://bugs.python.org/is
Paul Moore added the comment:
Personally I don't see the value (in general, I don't see much use for the
whole custom command idea - making the launcher into a generalised shebang
processor was never really a core feature). But I'm not going to say no if
others find it useful
Paul Moore added the comment:
Good catch, thanks Serhiy!
--
___
Python tracker
<https://bugs.python.org/issue31998>
___
___
Python-bugs-list mailing list
Unsub
New submission from Paul Long :
It would be helpful if the CSV module included standard functions that simplify
the import of CSV files to a list and the export of CSV files to a list.
Here's an example of what they could be:
def csv2list(file_name):
list_name=[]
with
Paul Long added the comment:
I should have added that there are thousands of 15 year old students completing
GCSE Computer Science who would benefit massively from this. All the exam
boards in England require students to be able to read from and write to CSV
files. The complicated way of
Paul Long added the comment:
Thanks for your advice. The reason it's not provided as a canned function is
because different schools can use different programming languages, although the
vast majority choose to use Python.
--
___
Python tr
Change by Paul Long :
--
keywords: +patch
pull_requests: +4478
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue32116>
___
___
Python-
New submission from Paul Ganssle :
The TestCase.assertRaises and TestCase.subTest macros apparently don't interact
with each other well. To demonstrate, consider the following code:
from unittest import TestCase
class SubTestRaisesTest(TestCase):
def test_assert_outer
Paul Ganssle added the comment:
@r.david.murray So it is, my mistake. I think I was conflating issues when this
first came up, and then I didn't notice that the order the test cases printed
in was different than I expected.
--
stage: -> resolved
status: open -
Change by Paul Ganssle :
--
pull_requests: +4611
___
Python tracker
<https://bugs.python.org/issue15873>
___
___
Python-bugs-list mailing list
Unsubscribe:
Paul Ganssle added the comment:
> The better is the enemy of the good here. Given the history of this issue, I
> would rather accept a well documented restrictive parser than wait for a more
> general code to be written. Note that we can always relax the parsing rules
> i
Paul Ganssle added the comment:
> The other difference is Mattieu guarantees ValueError for invalid input
> strings, which I think is good.
I forgot to address this - but I don't think this is a difference in
approaches. If you pass `None` or an int or something, the problem
paul j3 added the comment:
Did you copy the output right? Testing your parser:
Without any arguments, I get the exclusive group error - the group is required:
0930:~/mypy/argdev$ python3 issue18943.py
usage: issue18943.py [-h]
(--device-get-capabilities | --ptz-absolute
paul j3 added the comment:
A difficulty with writing a public API is that useful changes can occur at
almost any level of the class.
The existing subclasses modify small, but deep methods, ones that handle things
like line wrapping.
On the other hand, most of the issues you cite deal with
paul j3 added the comment:
That's not how flagged (optionals) arguments work.
The default value is used if the flag is not provided at all. One of your
arguments is a 'store_true'. Its default value if False, which is changed to
True if the '--device-get-capabiliti
paul j3 added the comment:
In the recently pushed, https://bugs.python.org/issue14191, "argparse doesn't
allow optionals within positionals"
we added new parsing functionality by defining a new parser method:
parse_intermixed_args
It added functionality without requiring a ne
Change by Paul Ganssle :
--
pull_requests: +4721
___
Python tracker
<https://bugs.python.org/issue5288>
___
___
Python-bugs-list mailing list
Unsubscribe:
Paul Moore added the comment:
This is a pip issue, not a Python issue. It's a known issue in the current
version of pip, and should be fixed in the development version (via pull
request https://github.com/pypa/pip/pull/4486).
If you like, you can try the development version of pip. A
Paul Ganssle added the comment:
@martin.panter I don't see the problem here? Wouldn't 23:59.995 round up to
00:00?
--
___
Python tracker
<https://bugs.python.o
Paul Ganssle added the comment:
> Not if the time is associated with a particular day. Imagine implementing
> datetime.fromisoformat by separately calling date.fromisoformat and
> time.fromisoformat. The date will be off by one day if you naively rounded
> 2017-12-18 23:59 “up” t
New submission from Paul Ganssle :
In the addition of the `fromisoformat()` alternate constructor (bpo-15873:
https://github.com/python/cpython/pull/4699), I noted that I was able to get
some significant speedup by special-casing the `datetime` baseclass in the C
code so that it bypasses the
New submission from Paul Ganssle :
In writing some tests for the alternate date constructors as part of my PR for
issue 32403 (https://bugs.python.org/issue32403), I noticed that for
`datetime`, the `fromtimestamp` bypasses the `__new__` call on the subclass:
from datetime import datetime
New submission from Paul Ganssle :
When preparing some tests for how subclasses of date and datetime react as part
of a fix for issue 32403, I noticed a fairly big example of where subclass is
not preserved - `tzinfo.fromutc`:
from datetime import datetime, timezone
class
Paul Ganssle added the comment:
I've noticed that there's another complicating factor here, which is that
addition of `timedelta` does not respect subclasses either, which means that
third party libraries implementing fromutc (as was recommended in issue 28602),
who will likely m
Change by Paul Ganssle :
--
keywords: +patch
pull_requests: +4881
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue32403>
___
___
Py
Change by Paul Ganssle :
--
keywords: +patch
pull_requests: +4882
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue32404>
___
___
Py
Change by Paul Ganssle :
--
nosy: +p-ganssle
___
Python tracker
<https://bugs.python.org/issue10381>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Paul Ganssle :
--
keywords: +patch
pull_requests: +4919
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issu
Paul Ganssle added the comment:
> I mean dropping `.copy()` breaks not only compatibility between pure python
> versions but also between pypy releases and pypy/CPython code.
That's why I suggest to keep `.copy()` as an alias for `__copy__()`.
If the main issue is that pypy user
Paul Ganssle added the comment:
@Andrew Are you suggesting that a `copy` method be *added* to the C
implementation, as an alias to __copy__? Because it makes no sense to keep the
pure Python and C implementations out of sync just so that it's easier for
projects forking the pure P
Paul Ganssle added the comment:
> There is no "fork" involved in other projects using it, from our point of
> view.
I did not mean "fork" in some judgmental sense, I'm mostly just familiar with
pypy, but I was under the impression that other projects were *l
Paul Ganssle added the comment:
@Nick
I'm certainly fine with re-configuring my PR to center around a new capsule
module with deprecation of the old C API (though if you have any examples of
what you have in mind that would be helpful to me). Certainly the "C global
needs to be
Paul Rudin added the comment:
If some are to be considered private then the questions are: which ones and how
to fix. Presumably renaming to start with "_" might break existing code, so
maybe adding an __all__, and just including the public objects is better? That
could break cod
Paul Rudin added the comment:
Documenting and generating a deprecation warning also makes them part of the
documented public api. Or are you suggesting just the warning without including
in the documentation?
Incidentally, there are also the classes BlockFinder and EndOfBlock, which are
Paul Ganssle added the comment:
This is essentially what the `tzinfos` argument to `dateutil.parser.parse`
does. I do think something *like* this is the only reasonable way to handle
%Z->tzinfo mappings.
In `dateutil`
(https://dateutil.readthedocs.io/en/latest/parser.h
Paul Ganssle added the comment:
By the way, one possibly significant problem with this interface is that it
would tend to encourage the use of static timezone offsets rather than rule
sets as intended by `tzinfo`. The main problem is that a simple mapping between
tzname and tzinfo (whether
Paul Ganssle added the comment:
Sorry, forgot to include the link to the dateutil implementation of the
fold-resolution code: https://github.com/dateutil/dateutil/pull/517/files
--
___
Python tracker
<https://bugs.python.org/issue32
Change by Paul Ganssle :
--
pull_requests: +4974
___
Python tracker
<https://bugs.python.org/issue30541>
___
___
Python-bugs-list mailing list
Unsubscribe:
Paul Moore added the comment:
Does this mean that we'll need to update the bundled ucrt whenever there are
security patches to the baseline version? Are we happy with the security
implications of that?
I thought one of the key advantages of using the system CRT (whether the old
msvcrX
Paul Moore added the comment:
Oh, so we're talking here about bundling the ucrt installers and then if the
user doesn't already have ucrt installed system wide, we will install a local
copy, but if they do, we don't do anything? If we install a local copy, then
it'll be
paul j3 added the comment:
In https://bugs.python.org/issue11354
'argparse: nargs could accept range of options count'
I explored the option allowing regex style range arguments, such as
nargs='{2,4}' or an equivalent tuple nargs=(2,4).
But that builds on https://bugs.
paul j3 added the comment:
To elaborate on my last comment, the existing subclasses that customize
formatting modify
_fill_text
_split_lines
_get_help_string
_get_default_metavar_for_optional
_get_default_metavar_for_positional
those are all 'private
New submission from Paul Ganssle :
One thing I think that is fairly common is the desire to get the current
datetime only up to a current precision, so you see a lot of things in, say,
`dateutil` like this:
dt = datetime.now().replace(hours=0, minutes=0, seconds=0, microseconds=0)
Or
Paul Ganssle added the comment:
An alternate possibility here might be to implement either `__round__` or a
`round` function in `datetime` (which would basically automatically add this
precision functionality to *all* the constructors, not just now). An example
implementation:
from datetime
Paul Ganssle added the comment:
@Victor: With regards to getting a "date as datetime", that is another way to
do it that I have also done in the past (and in fact it's how the new
dateutil.utils.today() function is implemented:
https://github.com/dateutil/dateutil/blob/
Change by Paul Ganssle :
--
type: -> enhancement
___
Python tracker
<https://bugs.python.org/issue32522>
___
___
Python-bugs-list mailing list
Unsubscrib
Paul Ganssle added the comment:
@Barry I don't think it's a good idea to duplicate the `replace` functionality
in `datetime` like that. I think the main problem isn't the `.replace`, it's
the fact that you have to specify exactly which components you want to set to
Paul Ganssle added the comment:
I think if we're going to use `timedelta` then `__mod__` is the more
appropriate option here, since it would be hard to interpret what `round(dt,
timedelta(hours=2, microseconds=31))` would do.
Either __mod__ or __round__ with `timedelta` is a bit of a st
Paul Ganssle added the comment:
One thing to note, the "example implementation" of __round__ above is an actual
working prototype*:
>>> round(Datetime.now(), 'second')
Datetime(2018, 1, 9, 11, 59, 35)
>>> round(Datetime.now(), 'day')
Da
Paul Ganssle added the comment:
> In my experience, when dealing with temporal data truncation (rounding
> towards -infinity) is more useful than any other form of rounding. See also
> issue 19475.
Ah, I agree - if you see that's how my __round__ implementation works. I guess
Paul Ganssle added the comment:
> Looking at the dateutil, I don't see a truncate to rrule function. Maybe a
> good starting point would be to implement that in dateutil and if some
> simpler pattern emerges that can be proposed for stdlib, we can discuss it
> then
Paul Ganssle added the comment:
> This can be accomplished rather efficiently by truncating a time tuple:
This will not preserve tzinfo, and (though this is not a concern unless
nanosecond precision is added), I don't believe it preserves microseconds
either.
That said, it's
Paul Ganssle added the comment:
> Still, this feature is not appealing enough to try to squeeze into 3.7
> release schedule. I think this should go through a round of discussion
> either on datetime-sig or python-ideas.
Agreed. I will put together some summary in the next week
Paul Goins added the comment:
Also, to be clear, I understand what David is saying and don't disagree at all.
And if this really is Spectre related, it may be difficult to "go back" and
test a before case, so my last comment about "digging in" may be rather moot.
Paul Goins added the comment:
I don't know enough about those tests and how important they are considered.
My only concern would be with the increased risk of undetected breakage caused
by removing them from CI, but if people think the risk is negligible and/or
acceptable, it's
Change by paul j3 :
--
nosy: +paul.j3
___
Python tracker
<https://bugs.python.org/issue15327>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
Paul Ganssle added the comment:
I think this is more a matter of misunderstanding the fact that ISO 8601 is a
larger and more complicated spec than people think. You'll note that the
original complaint also seems to think that a timezone is required (it is not).
You can find a copy o
Paul Ganssle added the comment:
Ah, actually, my mistake, RFC 3339 most assuredly *does* require a UTC offset:
4.4. Unqualified Local Time
A number of devices currently connected to the Internet run their
internal clocks in local time and are unaware of UTC. While the
Internet
Paul Moore added the comment:
You could add the line
import sys; sys.path.insert(0, '')
to a .pth file. The documentation you pointed out states that lines starting
with "import" are executed...
--
___
Py
Paul Koning added the comment:
FYI, I'm the one who created this problem back in 2012. I just submitted a GDB
patch for this, using PyImport_AppendInittab to define the built-in module at
startup. I'm not sure how I missed this originally; perhaps the documentation
was not as
Change by Paul Ganssle :
--
keywords: +patch
pull_requests: +7050
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issu
Paul Ganssle added the comment:
So I created a little patch for this, and when I was working on it I realized
that it's actually possible to implement full `fold` support in a generic way
in `fromutc` under the assumption that `utcoffset - dst` holds at all points
(which is the fundam
Paul Ganssle added the comment:
> I am aware of that. In fact, some of the draft versions of PEP 495
> implementation did contain such code. The problem is that any such
> tz.fromutc() implementation would necessarily change the behavior of the old
> programs.
This I'
paul j3 added the comment:
`parse_intermixed_args` was added in v 3.7.
https://docs.python.org/3/library/argparse.html#intermixed-parsing
https://stackoverflow.com/questions/50916124/allow-positional-command-line-arguments-with-nargs-to-be-seperated-by-a-flag
Change by Paul Ganssle :
--
nosy: +p-ganssle
___
Python tracker
<https://bugs.python.org/issue33941>
___
___
Python-bugs-list mailing list
Unsubscribe:
Paul Ganssle added the comment:
This can be closed now, I think.
--
___
Python tracker
<https://bugs.python.org/issue10381>
___
___
Python-bugs-list mailin
Change by Paul Ganssle :
--
nosy: +p-ganssle
___
Python tracker
<https://bugs.python.org/issue29097>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Paul Ganssle :
--
nosy: +p-ganssle
___
Python tracker
<https://bugs.python.org/issue33701>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Paul Ganssle :
--
nosy: +p-ganssle
___
Python tracker
<https://bugs.python.org/issue23607>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Paul Ganssle :
--
nosy: +p-ganssle
___
Python tracker
<https://bugs.python.org/issue15443>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Paul Ganssle :
--
nosy: +p-ganssle
___
Python tracker
<https://bugs.python.org/issue6280>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Paul Ganssle :
--
nosy: +p-ganssle
___
Python tracker
<https://bugs.python.org/issue34023>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Paul Ganssle :
--
nosy: +p-ganssle
___
Python tracker
<https://bugs.python.org/issue33940>
___
___
Python-bugs-list mailing list
Unsubscribe:
1501 - 1600 of 3008 matches
Mail list logo