[issue47184] multiprocessing.set_start_method force argument is not documented

2022-03-31 Thread John Hagen
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

[issue43834] Use context manager in StringIO example

2021-04-14 Thread John Hagen
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

[issue43834] Use context manager in StringIO example

2021-04-13 Thread John Hagen
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

[issue34556] Add --upgrade-deps to venv module

2020-09-05 Thread John Hagen
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/issue34

[issue25521] optparse module does not emit DeprecationWarning

2020-04-29 Thread John Hagen
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

[issue36309] Remove tempfile.mktemp()

2019-03-18 Thread John Hagen
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/issue36

[issue36309] Remove tempfile.mktemp()

2019-03-15 Thread John Hagen
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

[issue33921] Explain that '' can be used to bind to all interfaces for the AF_INET address family in the docs

2018-06-21 Thread John Hagen
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 name like 'can0

[issue33921] Explain that '' can be used to bind to all interfaces for the AF_INET address family in the docs

2018-06-20 Thread John Hagen
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 but it took

[issue29621] telnetlib.Telnet.write gives confusing error message when a string is passed in

2017-02-22 Thread John Hagen
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 recent call last): File

[issue29130] Exit code 120 returned from Python unit test testing SystemExit

2017-01-03 Thread John Hagen
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 <rep...@bugs.python.org> <http://bugs.python.org/i

[issue29130] Exit code 120 returned from Python unit test testing SystemExit

2017-01-01 Thread John Hagen
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

[issue28886] Deprecated abstract base class (abc) decorators do not raise DeprecationWarning

2016-12-06 Thread John Hagen
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

[issue27877] Add recipe for "valueless" Enums to docs

2016-08-29 Thread John Hagen
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 <rep...@bugs.python.org> <https://bugs.p

[issue27877] Add recipe for "valueless" Enums to docs

2016-08-29 Thread John Hagen
Changes by John Hagen <johntha...@gmail.com>: Removed file: https://bugs.python.org/file44249/issue27877.johnthagen.01.patch ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue27877] Add recipe for "valueless" Enums to docs

2016-08-28 Thread John Hagen
John Hagen added the comment: Patch attached. -- keywords: +patch Added file: https://bugs.python.org/file44249/issue27877.johnthagen.01.patch ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/i

[issue27877] Add recipe for "valueless" Enums to docs

2016-08-28 Thread John Hagen
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 would not be a bad

[issue27877] Add recipe for "valueless" Enums to docs

2016-08-27 Thread John Hagen
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

[issue26988] Add AutoNumberedEnum to stdlib

2016-08-18 Thread John Hagen
John Hagen added the comment: Ethan, thank you so much for all of your work. Looking forward to any future collaboration. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue26988] Add AutoNumberedEnum to stdlib

2016-08-17 Thread John Hagen
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: C

[issue26988] Add AutoNumberedEnum to stdlib

2016-08-16 Thread John Hagen
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 <rep...@bugs.python.org> <http://bugs.p

[issue26988] Add AutoNumberedEnum to stdlib

2016-08-02 Thread John Hagen
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 "There s

[issue27455] Fix tkinter examples to be PEP8 compliant

2016-07-13 Thread John Hagen
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 <rep...@bugs.python.org> <http://bugs.python.org/i

[issue26988] Add AutoNumberedEnum to stdlib

2016-07-12 Thread John Hagen
John Hagen added the comment: I like the addition of UniqueEnum. It's the default use case often. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue26988] Add AutoNumberedEnum to stdlib

2016-07-11 Thread John Hagen
John Hagen added the comment: >class BaseZeroEnum(Enum, start=0): > "initial integer is 0" > ... I also think this looks better. -- ___ Python tracker <rep...@bugs.python.org> <http:

[issue26988] Add AutoNumberedEnum to stdlib

2016-07-10 Thread John Hagen
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

[issue26988] Add AutoNumberedEnum to stdlib

2016-07-10 Thread John Hagen
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 better fit

[issue26988] Add AutoNumberedEnum to stdlib

2016-07-09 Thread John Hagen
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 is a

[issue26988] Add AutoNumberedEnum to stdlib

2016-07-09 Thread John Hagen
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 else

[issue27455] Fix tkinter examples to be PEP8 compliant

2016-07-06 Thread John Hagen
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 ___ Python

[issue27455] Fix tkinter examples to be PEP8 compliant

2016-07-06 Thread John Hagen
Changes by John Hagen <johntha...@gmail.com>: Removed file: http://bugs.python.org/file43641/0001-Fix-tkinter-docs-PEP8.diff ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue27455] Fix tkinter examples to be PEP8 compliant

2016-07-06 Thread John Hagen
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\pytho

[issue27455] Fix tkinter examples to be PEP8 compliant

2016-07-06 Thread John Hagen
Changes by John Hagen <johntha...@gmail.com>: Removed file: http://bugs.python.org/file43628/0001-Fix-tkinter-docs-PEP8.diff ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue27455] Fix tkinter examples to be PEP8 compliant

2016-07-05 Thread John Hagen
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 personally use

[issue27455] Fix tkinter examples to be PEP8 compliant

2016-07-05 Thread John Hagen
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, so

[issue27455] Fix tkinter examples to be PEP8 compliant

2016-07-05 Thread John Hagen
Changes by John Hagen <johntha...@gmail.com>: Removed file: http://bugs.python.org/file43627/0001-Fix-tkinter-docs-PEP8.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue27455] Fix tkinter examples to be PEP8 compliant

2016-07-05 Thread John Hagen
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

[issue26988] Add AutoNumberedEnum to stdlib

2016-06-29 Thread John Hagen
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 code, so

[issue27311] Incorrect documentation for zipfile.writestr()

2016-06-14 Thread John Hagen
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 <rep...@bugs.python.org> <http://bugs.python.org/i

[issue27311] Incorrect documentation for zipfile.writestr()

2016-06-13 Thread John Hagen
John Hagen added the comment: I'll submit a patch shortly. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27311> ___ ___ Pyth

[issue27311] Incorrect documentation for zipfile.writestr()

2016-06-13 Thread John Hagen
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

[issue26988] Add AutoNumberedEnum to stdlib

2016-05-10 Thread John Hagen
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 for empty

[issue26988] Add AutoNumberedEnum to stdlib

2016-05-09 Thread John Hagen
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

[issue25521] optparse module does not emit DeprecationWarning

2016-05-07 Thread John Hagen
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

[issue26149] Suggest PyCharm Community as an editor for Unix platforms

2016-01-18 Thread John Hagen
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

[issue25521] optparse module does not emit DeprecationWarning

2015-11-04 Thread John Hagen
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 miss

[issue25521] optparse module does not emit DeprecationWarning

2015-11-01 Thread John Hagen
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 get

[issue25521] optparse module does not emit DeprecationWarning

2015-11-01 Thread John Hagen
Changes by John Hagen <johntha...@gmail.com>: Removed file: http://bugs.python.org/file40913/optparse_deprecationwarning.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue25521] optparse module does not emit DeprecationWarning

2015-10-31 Thread John Hagen
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

[issue25521] optparse module does not emit DeprecationWarning

2015-10-30 Thread John Hagen
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

[issue24852] Python 3.5.0rc1 HOWTO Use Python in the web needs fix

2015-08-13 Thread John Hagen
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 the shebang

[issue24852] Python 3.5.0rc1 HOWTO Use Python in the web needs fix

2015-08-12 Thread John Hagen
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 confusion: https