Change by Ram Rachum :
--
keywords: +patch
pull_requests: +17335
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/17928
___
Python tracker
<https://bugs.python.org/issu
New submission from Ram Rachum :
I've been doing some research into the use of `\d` in regular expressions in
CPython, and any security vulnerabilities that might happen as a result of the
fact that it accepts non-Ascii digits like ٢ and 5.
In most places in the CPython codebase
Change by Ram Rachum :
--
pull_requests: +17336
pull_request: https://github.com/python/cpython/pull/17931
___
Python tracker
<https://bugs.python.org/issue39
Change by Ram Rachum :
--
keywords: +patch
pull_requests: +17337
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/17931
___
Python tracker
<https://bugs.python.org/issu
Ram Rachum added the comment:
> To me, this seems like a pretty thin justification for calling this a
> security vulnerability.
I know that lots of exploits were made because of bugs in Python's URL parsing,
and security releases of Python were made because of that. It'
Ram Rachum added the comment:
Okay, since it seems like I'm the only one who wants this change, I'll let it
go. Thanks for your input.
--
___
Python tracker
<https://bugs.python.o
Ram Rachum added the comment:
My approach is that any input that's unexpected by the developer but accepted
by the program could cause either a bug or a security problem, and should be
rejected by the program. I don't have a specific example for this case.
If you think I need
Ram Rachum added the comment:
Hey Victor, adding you here. This ticket is a continuation of the thread on the
Python security mailing list. I see that there isn't a consensus here for
changing from \d to [0-9]. Can you make a decision on whether to go ahead with
this issue or not? Othe
Ram Rachum added the comment:
Hi guys,
Can we please have a decision on whether we want to move forward with this
issue or not? I have a patch in the PR, and I'll be happy to continue working
on it, or close this issue if that's the decision.
T
New submission from Ram Rachum :
I was playing with the `ast` library today, and it's frustrating to see objects
like these:
[<_ast.Import object at 0x033FB048>,
<_ast.Import object at 0x033FB0F0>,
<_ast.ImportFrom object at 0x033FB160
Change by Ram Rachum :
--
components: Library (Lib)
nosy: cool-RR
priority: normal
pull_requests: 17962
severity: normal
status: open
title: Fix exception causes in tarfile module
type: behavior
versions: Python 3.9
___
Python tracker
<ht
Ram Rachum added the comment:
I understand that we have to be really careful in including information that
could have unlimited size. But I think we have lots of information that isn't
that way.
For example, for ClassDef and FunctionDef objects, we could include the name.
For Assig
Ram Rachum added the comment:
> What do you think it is necessary to switch from implicit chaining to
> explicit chaining?
I didn't say it's necessary, but I think it's beneficial. I find that message
between exceptions useful when I'm debugging and I'd like
Ram Rachum added the comment:
I'm also strongly against using `from None`. When I'm debugging, I'm like a man
who got lost in the desert and is about to die of thirst. Any possible insight
into what happened is like an oasis, even if there are just a few drops of
water the
Ram Rachum added the comment:
Ethan, did we successfully convince you not to use `from None`?
--
___
Python tracker
<https://bugs.python.org/issue39717>
___
___
Ram Rachum added the comment:
Ethan, got a verdict?
--
___
Python tracker
<https://bugs.python.org/issue39717>
___
___
Python-bugs-list mailing list
Unsub
Ram Rachum added the comment:
I understand. I've closed my PR and I'll let someone else implement this
ticket-- I don't want to be the reason that someone didn't get the information
they wanted in an error report. Thanks
New submission from Ram Rachum :
Looking at the enum source code, there's a method `_create_pseudo_member_`
that's used in a bunch of places. Its docstring says "Create a composite member
iff value contains only members", which would have been useful if I had any
idea wh
New submission from Ram Rachum :
Today I was tripped up by an inconsistency in the `re` docstring. I wanted to
use DOTALL as a flag inside my regex, rather than as an argument to the
`compile` function. Here are two lines from the docstring:
(?aiLmsux) Set the A, I, L, M, S, U, or X flag
Change by Ram Rachum :
--
keywords: +patch
pull_requests: +18434
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/19078
___
Python tracker
<https://bugs.python.org/issu
Ram Rachum added the comment:
As you can see I left the old uppercase enums defined, to avoid breaking
backward compatibility. We could make them trigger a DeprecationWarning.
--
___
Python tracker
<https://bugs.python.org/issue40
Ram Rachum added the comment:
Well, these aren't the textbook case of a constant, since they're enums, and
not defined in the global namespace.
--
___
Python tracker
<https://bugs.python.o
Ram Rachum added the comment:
Oops, my mistake. Any other idea how to solve this discrepancy?
--
___
Python tracker
<https://bugs.python.org/issue40016>
___
___
Ram Rachum added the comment:
I'm gonna look past the rudeness, and I'll just say that if I was tripped up by
this, after 11 years of working with Python and the re module, then people in a
beginner or intermediate level could be tripped up by this as well.
Here's a
Ram Rachum added the comment:
I updated my PR to match.
--
___
Python tracker
<https://bugs.python.org/issue40016>
___
___
Python-bugs-list mailing list
Unsub
Ram Rachum added the comment:
Here are the tests I made:
https://github.com/cool-RR/cpython/commit/766409748a107f290997b0cfab5aa19d0c2888e5
--
___
Python tracker
<https://bugs.python.org/issue40
New submission from Ram Rachum :
I saw this line of code today:
https://github.com/hyperledger/sawtooth-sdk-python/commit/c27b962541c9ae68fd1e6dc691ddee883234f112#diff-eb008203eae2160c5e14c42e5fd2eee164709a93bf5136fa79cc256d4e46eaffR92
I was about to tell this guy that his code is bad since
Ram Rachum added the comment:
People barely know how to use the right form of this feature. Providing them
with a wrong form that's confusingly similar to the right form and fails
silently is an unfortunate choice.
"Or just don't do anything. A `raise exception` inside an ex
New submission from Ram Rachum :
I'm a noob on parsing, learning about it, so it's possible I've made a mistake
somewhere.
I know there's this page: https://docs.python.org/3/reference/grammar.html
Which is a full listing of Python's grammar. However, loo
Ram Rachum added the comment:
Hmm, I feel this isn't right, because I still feel like there should be one
place where one can see the full Python syntax specification, lexing and
parsing and all. But I'm underqualified to argue because I don't understand the
details.
Ram Rachum added the comment:
I understand, thank you.
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/i
New submission from Ram Rachum :
I'm writing the patch now.
--
components: Library (Lib)
messages: 369767
nosy: cool-RR
priority: normal
severity: normal
status: open
title: Implement PurePath.__len__
type: enhancement
versions: Python
Change by Ram Rachum :
--
keywords: +patch
pull_requests: +19611
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/20348
___
Python tracker
<https://bugs.python.org/issu
Ram Rachum added the comment:
Just return len(str(path)). I put the use case on the PR on GitHub.
--
___
Python tracker
<https://bugs.python.org/issue40
New submission from Ram Rachum :
No need to inherit from object. I'm writing the patch now.
--
components: Library (Lib)
messages: 369770
nosy: cool-RR
priority: normal
severity: normal
status: open
title: Remove Python 2 compatibility code from pathlib
type: enhancement
ver
Change by Ram Rachum :
--
keywords: +patch
pull_requests: +19612
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/20349
___
Python tracker
<https://bugs.python.org/issu
Ram Rachum added the comment:
"We usually do not accept such pure cosmetic changes." Is this an axiom or is
the reasoning written down somewhere? I'd think we all like to remove cruft
that's no longer necessary.
--
___
Py
Ram Rachum added the comment:
Remi: Your use case is taken care of by `len(path.parts)`.
Serhiy: "If it is not iterable, the length does not make sense." I'm not sure
this is a rule. I do see that the `collections.abc.Sized` class does not
require an `__iter__` metho
Change by Ram Rachum :
--
nosy: +brandtbucher
___
Python tracker
<https://bugs.python.org/issue40753>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ram Rachum added the comment:
I understand your argument. I think it relies on your earlier statement: "The
fact the the path is stored as a string is an implementation detail."
This statement reminds me of the term "architecture astronaut". Pathlib builds
a cool a
Ram Rachum added the comment:
Antoine: Serhiy linked me to this issue when I opened #40753 . Do you think
that this patch by Serhiy could now be merged?
--
nosy: +cool-RR
___
Python tracker
<https://bugs.python.org/issue20
Ram Rachum added the comment:
Brett: Oh well, I understand. Looking at the devguide, I can't find where this
is written. I'm interested in seeing how it's phrased, because I do think that
tiny, incremental changes are important. I would want to know why, for example,
Ram Rachum added the comment:
I see it's been 6 years since the last comment here. I think it's important to
revisit these kind of decisions once in a while. Maybe now the time is ripe for
a change? We could do it backward compatibility with a long deprecation
schedule.
Ezio: You
New submission from Ram Rachum :
Writing the PR now.
--
assignee: docs@python
components: Documentation
messages: 370459
nosy: brandtbucher, cool-RR, docs@python
priority: normal
severity: normal
status: open
title: Clarify docstring of Path.rename
type: enhancement
versions: Python
Change by Ram Rachum :
--
keywords: +patch
pull_requests: +19797
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/20554
___
Python tracker
<https://bugs.python.org/issu
New submission from Ram Rachum :
Why see this:
When you can see this:
It could show columns=? if they weren't read yet. Any other info would be good
too.
This applies to all classes in the csv module.
--
components: Library (Lib)
messages: 370768
nosy: cool-RR
pri
New submission from Ram Rachum :
I was working with the csv module, and I vaguely remembered that you should
open files in binary mode. So I did.
Then I saw this error message:
_csv.Error: iterator should return strings, not bytes (did you open the
file in text mode?)
I read the end
Change by Ram Rachum :
--
keywords: +patch
pull_requests: +19873
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/20653
___
Python tracker
<https://bugs.python.org/issu
Change by Ram Rachum :
--
components: Library (Lib)
nosy: cool-RR
priority: normal
severity: normal
status: open
title: Clarify motivation for `chain.from_iterable`
type: enhancement
versions: Python 3.10
___
Python tracker
<https://bugs.python.
Change by Ram Rachum :
--
keywords: +patch
pull_requests: +20060
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/20871
___
Python tracker
<https://bugs.python.org/issu
Change by Ram Rachum :
--
pull_requests: +20140
pull_request: https://github.com/python/cpython/pull/20961
___
Python tracker
<https://bugs.python.org/issue40
New submission from Ram Rachum :
Writing the PR now.
--
components: Library (Lib)
messages: 371997
nosy: brandtbucher, cool-RR
priority: normal
severity: normal
status: open
title: Use zip-strict in zoneinfo
type: enhancement
versions: Python 3.10
Change by Ram Rachum :
--
keywords: +patch
pull_requests: +20202
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/21031
___
Python tracker
<https://bugs.python.org/issu
Ram Rachum added the comment:
I'll fix that typo.
--
___
Python tracker
<https://bugs.python.org/issue40636>
___
___
Python-bugs-list mailing list
Unsubscr
Change by Ram Rachum :
--
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue39280>
___
___
Pyth
New submission from Ram Rachum :
Writing the patch now.
Thread:
https://mail.python.org/archives/list/python-id...@python.org/thread/OHLXVKIBMNSQO6BCFK6LEHSYNXDB6OQJ/
--
components: Library (Lib)
messages: 374683
nosy: cool-RR
priority: normal
severity: normal
status: open
title
Change by Ram Rachum :
--
keywords: +patch
pull_requests: +20848
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/21704
___
Python tracker
<https://bugs.python.org/issu
New submission from Ram Rachum :
Writing the patch now.
--
assignee: docs@python
components: Documentation
messages: 374814
nosy: cool-RR, docs@python
priority: normal
severity: normal
status: open
title: Fix mistake in "What's new in Python 3.7"
versi
Change by Ram Rachum :
--
keywords: +patch
pull_requests: +20878
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/21733
___
Python tracker
<https://bugs.python.org/issu
Change by Ram Rachum :
--
type: -> crash
versions: +Python 3.10, Python 3.8, Python 3.9
___
Python tracker
<https://bugs.python.org/issue41475>
___
___
Py
Ram Rachum added the comment:
If you'd like me to patch that too, let me know. Also, I'll need a decision on
whether it should be on a separate PR and if so, to which versions it should be
backported.
--
___
Python track
Ram Rachum added the comment:
Thanks for linking that, YoStealth. Unless I'm missing anything, it looks like
there's agreement that the right answer is 3.10, and my PR fixes a spot which
was omitted in the PR from the previous issu
Change by Ram Rachum :
--
nosy: +rhettinger
___
Python tracker
<https://bugs.python.org/issue41773>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Ram Rachum :
I was recently tripped up by a bug caused by passing infinite weights to
random.choices. I toyed around with that function, and it seemed that when it's
given weights that include infinity or NaN, it selects a specific element,
always without being r
Ram Rachum added the comment:
I disagree, especially the bit about slowing down the function, since you're
checking the total, not every element. Like the check for negative numbers that
you do on line 493. But it's your call.
--
Ram Rachum added the comment:
Speaking of that check, the error message is 'Total of weights must be greater
than zero', which is a bit misleading. 'All weights must be positive or zero'
would be more accurate. Would yo
Ram Rachum added the comment:
Yes, but the docs say that the weights are assumed to be nonnegative. I'm
assuming the check is done on total because it'd be expensive to do it on each
item. A user reading that error message could understand that it's okay for
weights to be n
Ram Rachum added the comment:
Thanks for your time, and I accept your decision here. I'd appreciate it though
if you wouldn't use the term "made up issue" on something that happened to me a
couple of days ago. Our opposing positions each have their pros and cons, and
New submission from Ram Rachum :
Writing the patch now.
--
components: Library (Lib)
messages: 377534
nosy: cool-RR
priority: normal
severity: normal
status: open
title: Include options for timespec in docstrings of isoformat
type: enhancement
versions: Python 3.10
Change by Ram Rachum :
--
keywords: +patch
pull_requests: +21455
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/22418
___
Python tracker
<https://bugs.python.org/issu
Ram Rachum added the comment:
Sounds good, I'm on it.
--
___
Python tracker
<https://bugs.python.org/issue41773>
___
___
Python-bugs-list mailing list
Change by Ram Rachum :
--
keywords: +patch
pull_requests: +21470
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/22441
___
Python tracker
<https://bugs.python.org/issu
New submission from Ram Rachum :
Writing the patch now.
--
assignee: docs@python
components: Documentation
messages: 381263
nosy: cool-RR, docs@python
priority: normal
severity: normal
status: open
title: Clarify documentation of TestCase.assertIs
type: enhancement
versions: Python
Change by Ram Rachum :
--
keywords: +patch
pull_requests: +22241
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/23348
___
Python tracker
<https://bugs.python.org/issu
New submission from Ram Rachum :
Please allow using decimals as arguments to `timedelta`, so the following code
won't raise an exception:
Python 3.3.0a1 (default, Mar 4 2012, 17:27:59) [MSC v.1500 32 bit (Intel)] on
win32
Type "help", "copyright", "credits"
Ram Rachum added the comment:
I'm not proposing that `timedelta` will use `Decimal` internally, but that it
would handle the conversion to `float` itself, instead of the user having to do
it.
--
___
Python tracker
<http://bugs.py
Ram Rachum added the comment:
Thanks for the patch!
--
___
Python tracker
<http://bugs.python.org/issue14262>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ram Rachum added the comment:
"I'm not completly conviced by the need of supporting Decimal in timedelta
constructor. Why do you use Decimal if the result should be a timedelta? Why
not using timedelta directly?"
What do you mean, "Why not using timedelta directly?"
Ram Rachum added the comment:
In some cases we indeed use a timedelta directly, but sometimes we get a
"number of hours", and in those cases it's more convenient for us to work with
"number of hours" directly.
--
Change by Ram Rachum :
--
nosy: -cool-RR
___
Python tracker
<https://bugs.python.org/issue22377>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ram Rachum added the comment:
Hi Vinay,
Since it's been a couple of years since I opened this ticket, I can't tell you
the case in which I wanted to know the full module name of a logger. But it's
probably been a logger from a third-party library. Since I can't force a
Change by Ram Rachum :
--
components: Library (Lib)
nosy: cool-RR
priority: normal
severity: normal
status: open
title: Implement `mmap.mmap.__repr__`
type: enhancement
versions: Python 3.8
___
Python tracker
<https://bugs.python.org/issue34
Ram Rachum added the comment:
There are a few ways we can go with this, depending on how verbose we want to
be and how willing we are to make calls to the data. Here are a few pieces of
information we could expose:
- Length
- Whether it's a file or anonymous memory
- The entire con
Ram Rachum added the comment:
thautwarm, your suggestions look good. I'm not sure why you used
`entire_contents`, do you want to show the entire content there? Because I saw
that the sample you used had truncation. It might be unsafe to show the entire
mmap, because it could be huge
New submission from Ram Rachum:
I have a `Future` and I want to check whether it's in finished state. It seems
like I don't have a method to do that, right? (I could emulate the existing
methods for checking Future state, but that would mean fiddling with private
variables.)
Wh
Ram Rachum added the comment:
I guess that'd be equivalent, yes.
--
___
Python tracker
<http://bugs.python.org/issue18212>
___
___
Python-bugs-list m
Changes by Ram Rachum :
--
nosy: -cool-RR
___
Python tracker
<http://bugs.python.org/issue3177>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ram Rachum added the comment:
I opened this issue 2 years ago, and I don't remember it being easily solvable
back then. But I've long forgotten what the problems were, and I've lost
personal interest in it, so I guess we'll just let it go.
--
sta
New submission from Ram Rachum:
Please allow multiplying timedelta by a Decimal:
Python 3.3.0a1 (default, Mar 4 2012, 17:27:59) [MSC v.1500 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information
Ram Rachum added the comment:
This is for cases where I already have the number as a Decimal. Asking me to
convert it to `float` myself is annoying.
--
___
Python tracker
<http://bugs.python.org/issue15
Ram Rachum added the comment:
+1 on folding this into issue 14262.
--
___
Python tracker
<http://bugs.python.org/issue15975>
___
___
Python-bugs-list mailin
Ram Rachum added the comment:
@mark.dickinson: Many different sources. One example is decimal fields on
Django, used for dollar amounts.
--
___
Python tracker
<http://bugs.python.org/issue14
Ram Rachum added the comment:
I hope this was intended as a joke. If this was an actual criticism, let me
know so I could explain why it makes sense.
--
___
Python tracker
<http://bugs.python.org/issue14
Ram Rachum added the comment:
I can think of millions of use cases. Here's a random one out of those
millions: A client is entitled to X hours of service a month. We grant him a
promotion where he is allowed 15% more than x, i.e. 1.15*x. But that number,
1.15, is stored in a Django de
Ram Rachum added the comment:
In the example I gave, Decimal is clearly preferred over float. Why would we
use float to represent the ratio of the bonus to the client? Why would we risk
imprecision there when Decimal provides us with perfect precision
Changes by Ram Rachum :
--
title: Add `pathlib.Path.write` and `pathlib.Path.read` -> Add methods to
`pathlib.Path`: `write_text`, `read_text`, `write_bytes`, `read_bytes`
___
Python tracker
<http://bugs.python.org/issu
Ram Rachum added the comment:
Thanks for the code review Antoine.
It seems like the only non-trivial comment is regarding the `append` and
`exclusive` arguments:
"I don't think "append" and "exclusive" deserve to be arguments here.
write_bytes()/write_text() i
Ram Rachum added the comment:
Okay, different approach: How about having a mode argument with a default?
(Defaults of 'rb', 'r', 'wb', 'w' respectively.)
This way users who wish to use append, exclusive, or any other future mode will
be able to
Ram Rachum added the comment:
I understand Antoine.
At this point, while I could easily implement the changes you ask for in your
review, I'm concerned that we are spending our time adding a feature to Python
that nobody really loves.
What I'd really love is a pair of methods
New submission from Ram Rachum:
I'm trying to install Python 3.4 final on Windows 7 and it doesn't work. I'm
using the x64 MSI.
Nothing happens after running the MSI. I used Process Explorer but I can't see
any new process created. I tried restarting my computer,
101 - 200 of 398 matches
Mail list logo