New submission from John Hagen :
multiprocessing.set_start_method() has a `force` argument that is not
documented:
https://docs.python.org/3.10/library/multiprocessing.html#multiprocessing.set_start_method
--
assignee: docs@python
components: Documentation
messages: 416451
nosy: John
New submission from John Hagen :
The example for StringIO currently manually closes the object rather than using
a context manager. Since this is likely the first code that a new user
encounters and context managers reduce error-prone situations, I think it would
be helpful to show usage as
Change by John Hagen :
--
keywords: +patch
pull_requests: +24133
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/25401
___
Python tracker
<https://bugs.python.org/issu
John Hagen added the comment:
With PEP 594 (https://www.python.org/dev/peps/pep-0594/) in the pipeline, is it
time that optparse correctly emits DeprecationWarnings?
--
___
Python tracker
<https://bugs.python.org/issue25
John Hagen added the comment:
I noticed this new feature was not added to the Python 3.9 what's new:
https://docs.python.org/3.9/whatsnew/3.9.html#venv
Should it be?
--
nosy: +John Hagen
___
Python tracker
<https://bugs.python.org/is
New submission from John Hagen :
tempfile.mktemp has been deprecated since Python 2.3 and has security concerns
attached to it. Is it time that this is finally removed?
https://docs.python.org/3/library/tempfile.html#tempfile.mktemp
--
components: Library (Lib)
messages: 338046
nosy
John Hagen added the comment:
Should it be a DeprecationWarning instead of a RuntimeWarning? (or both since
it's both deprecated and a security issue?)
--
___
Python tracker
<https://bugs.python.org/is
New submission from John Hagen :
The socket documentation
(https://docs.python.org/3/library/socket.html#socket-families) does not list
'' as a way to bind to all interfaces for the AF_INET/AF_INET6 address family.
This is answered on SO here: https://stackoverflow.com/a/8034146 b
John Hagen added the comment:
@ammar2
I see that now. Yeah it's further down in the docs and doesn't actually call
out '' like is done for AF_CAN:
A tuple (interface, ) is used for the AF_CAN address family, where interface is
a string representing a network interface n
New submission from John Hagen:
In the abc module (https://docs.python.org/3/library/abc.html) the following
decorators have been deprecated since Python 3.3:
- abstractclassmethod
- abstractstaticmethod
- abstractproperty
But if you run the following example code using Python 3.5.2 with
New submission from John Hagen:
I recently tried to port one of my packages to Python 3.6 and unit tests that
worked in Python 2.7, 3.3-3.5 began failing in 3.6.
I originally thought it was a problem with coverage, but it turns out it was
not. The full thread is:
https://bitbucket.org/ned
John Hagen added the comment:
I'm completely fine with closing this issue. Thanks for the help everyone.
If someone else doesn't close it in a couple days, I'll do it.
--
___
Python tracker
<http://bugs.pyt
New submission from John Hagen:
I was recently helping someone learn Python 3 from Python 2 and they were
confused by error resulting from the following easy-to-make mistake:
import telnetlib
tn = telnetlib.Telnet('localhost')
tn.write('hello')
Traceback (most recen
New submission from John Hagen:
The function signature and description for zipfile.writestr is incorrect:
https://docs.python.org/3.5/library/zipfile.html#zipfile.ZipFile.writestr
See:
https://github.com/python/cpython/blob/master/Lib/zipfile.py#L1610
The documentation calls the parameter
John Hagen added the comment:
I'll submit a patch shortly.
--
___
Python tracker
<http://bugs.python.org/issue27311>
___
___
Python-bugs-list mailing list
John Hagen added the comment:
Patch attached.
--
keywords: +patch
Added file:
http://bugs.python.org/file43395/0001-Fix-ZipFile.writestr-data-argument-name.patch
___
Python tracker
<http://bugs.python.org/issue27
John Hagen added the comment:
@Ethan/Barry what needs to be done now to accept or reject this for Python 3.6?
Should I propose it onto python-dev? If accepted, would be nice to get it in
before alpha 3 (~2 weeks). What's nice about this proposal is Ethan has
already written the cod
New submission from John Hagen:
Patch fixes tkinter examples to be PEP8 compliant.
--
assignee: docs@python
components: Documentation
files: 0001-Fix-tkinter-docs-PEP8.patch
keywords: patch
messages: 269820
nosy: John Hagen, docs@python
priority: normal
severity: normal
status: open
Changes by John Hagen :
Removed file: http://bugs.python.org/file43627/0001-Fix-tkinter-docs-PEP8.patch
___
Python tracker
<http://bugs.python.org/issue27455>
___
___
John Hagen added the comment:
@Berker, sorry for the incorrect diff format, still new to CPython (and
Mercurial) workflow. I've attached the diff in a new format.
@SilentGhost I see what you mean that camelCase is used often in tkinter
(though many of the examples use lower_camel_case,
John Hagen added the comment:
@Terry The reason for changing the quotes was for consistency, since everywhere
else on that page used double quotes. That being said, I don't have a strong
preference and will happily revert it if that is the consensus. I'm +0 on the
change.
I pers
Changes by John Hagen :
Removed file: http://bugs.python.org/file43628/0001-Fix-tkinter-docs-PEP8.diff
___
Python tracker
<http://bugs.python.org/issue27455>
___
___
Pytho
John Hagen added the comment:
@Terry I've removed the two string quotes changes in the latest patch.
@Berker I spent a small amount of time trying out your proposed super()
changes, but could not get them to work on 3.5.1.
"C:\Users\John Hagen\AppData\Local\Programs\Python\Python35\
Changes by John Hagen :
Removed file: http://bugs.python.org/file43641/0001-Fix-tkinter-docs-PEP8.diff
___
Python tracker
<http://bugs.python.org/issue27455>
___
___
Pytho
John Hagen added the comment:
@Berker, thanks for the tip! I've fixed it up.
I think this latest patch covers everything Berker and Terry have commented
about.
--
Added file: http://bugs.python.org/file43645/Fix-tkinter-docs-PEP8.diff
___
P
John Hagen added the comment:
Is this something we want to get in before the next alpha in two days? Just
wanted to bring up the deadline since this may be a feature people want to play
around with during the alpha phase.
Ethan, I'm happy to help with documentation or anything
John Hagen added the comment:
> What happens with `property`?
>
> - `property` is looked up in the class namespace
Perhaps you've already considered this, I'm not intimately familiar with how
classes are parsed and constructed but is it possible to determine if the
object
John Hagen added the comment:
Some ideas for the new stdlib class:
BasicEnum - This helps emphasize that it is a simpler version of Enum that
doesn't support all of the Enum features (like assigning values). It also helps
communicate that if you don't need values this is a
John Hagen added the comment:
To me, class Color(AutoEnum) and class Color(AutoEnum, IntEnum) is a little
more straightforward. It makes usage of AutoEnum similar to IntEnum, and I
would expect it to be at least as popular as it.
A enum-related side question, since the plan is for this to go
John Hagen added the comment:
>class BaseZeroEnum(Enum, start=0):
> "initial integer is 0"
> ...
I also think this looks better.
--
___
Python tracker
<http://bugs
John Hagen added the comment:
I like the addition of UniqueEnum. It's the default use case often.
--
___
Python tracker
<http://bugs.python.org/is
John Hagen added the comment:
The patch was reviewed and marked ready to commit. Could someone with commit
privileges perform the final commit? Thanks.
--
___
Python tracker
<http://bugs.python.org/issue27
John Hagen added the comment:
@Ethan
I reviewed your latest patch. I think it's a good step forward in terms of
simplicity. Most of my comments were not major.
Even before this patch, I was mulling around how enum.Unique, enum.UniqueEnum,
and enum.unique seemed to violate the "Th
John Hagen added the comment:
I think there is a small typo in the Changelog / What's New. The Issue isn't
hyper-linked:
https://docs.python.org/3.6/whatsnew/changelog.html#id2
--
___
Python tracker
<http://bugs.python.o
John Hagen added the comment:
@Raymond, you raise valid concerns to be sure. Hoping we can work something
out.
@Ethan, what are your thoughts?
It's not just C that has enums where you can define a unique group of names and
omit the values for clarity when they are not significant:
John Hagen added the comment:
Ethan, thank you so much for all of your work. Looking forward to any future
collaboration.
--
___
Python tracker
<http://bugs.python.org/issue26
New submission from John Hagen:
Many programming languages allow the developer to define a enum without
specifying values when there would be no significance to those values. Adding
some kind of support in the stdlib itself was rejected due to the high degree
of magic that would be needed
John Hagen added the comment:
Raymond, thanks for your consideration and input.
I'll work on a small patch unless I hear from Ethan that he'd rather do it.
I'm happy to defer to his expertise.
I did try out None as a value just to be sure that that didn't work as it
John Hagen added the comment:
Patch attached.
--
keywords: +patch
Added file: https://bugs.python.org/file44249/issue27877.johnthagen.01.patch
___
Python tracker
<https://bugs.python.org/issue27
Changes by John Hagen :
Removed file: https://bugs.python.org/file44249/issue27877.johnthagen.01.patch
___
Python tracker
<https://bugs.python.org/issue27877>
___
___
John Hagen added the comment:
Emanuel, I like your rewording. Uploaded a new patch incorporating it.
--
Added file: https://bugs.python.org/file44252/issue27877.johnthagen.02.patch
___
Python tracker
<https://bugs.python.org/issue27
New submission from John Hagen:
https://docs.python.org/3.5/howto/webservers.html#setting-up-fastcgi
The "HOWTO Use Python in the web" documentation for 3.5.0rc1 prescribes to use
flup in its example, which is not compatible with Python 3.
This has led to some confusi
John Hagen added the comment:
A couple other notes I saw:
The examples
(https://docs.python.org/3.5/howto/webservers.html#setting-up-fastcgi) do not
follow PEP 8 (should not have an encoding statement if it is UTF-8 Python 3) or
the current guidance in PEP 394 to use "python3" in t
New submission from John Hagen:
According to the Python docs, optparse has been deprecated since Python 3.2,
but it does not emit a DeprecationWarning when imported Python 3.2+.
https://docs.python.org/3/library/optparse.html
PyCharm can uses these DeprecationWarnings to provide helpful
John Hagen added the comment:
First time trying to contribute to the Python standard library.
I attached a patch that is modeled off the deprecated imp module. The
DeprecationWarning message is taken from the Python docs:
https://docs.python.org/3/library/optparse.html
--
keywords
John Hagen added the comment:
@martin.panter My new patch fixes Lib/test_optparse.py by suppressing the
warning like test_imp does as you suggested.
@serhiy.storchaka I don't have a strong preference that it be a
DeprecationWarning vs. PendingDeprecationWarning since to me, both ge
Changes by John Hagen :
Removed file: http://bugs.python.org/file40913/optparse_deprecationwarning.patch
___
Python tracker
<http://bugs.python.org/issue25521>
___
___
John Hagen added the comment:
Is there any consensus on how to move forward with this? I feel there are at
least 4 options:
1) Do nothing.
Pro: No work.
Con: It feels misleading to the user since the docs clearly state it's
deprecated. Some users (especially new ones) may mis
New submission from John Hagen:
The Python documentation recommends editors that can be used on Unix:
https://docs.python.org/3.5/using/unix.html#editors
If the intent is to advertise very excellent IDEs (as Geany and Komodo Edit are
listed), I suggest that PyCharm Community Edition
(https
John Hagen added the comment:
With 3.6.0a1 scheduled just around the corner, is there consensus about how to
begin this? I just signed the contributor agreement, so I should be able to
try to help if we have a plan on how to divide the work
New submission from John Hagen:
I suggest that the AutoNumberedEnum be added to the standard library for the
following reasons:
1) Provides a fundamental tool for defining a unique, abstract set of coupled
members
2) Avoids boilerplate @enum.unique for a very common use case of enumerations
3
John Hagen added the comment:
@Ethan, I hadn't tried to use the aenum AutoNumberEnum that way, but I agree
with Barry that I like it. To me that is the ideal case we should shoot for as
I think it's the best* long term and deviate only if practical concerns prevent
it.
So I am +1
52 matches
Mail list logo