[Python-Dev] [Python-checkins] bpo-5001: More-informative multiprocessing error messages (#3079) (original) (raw)

Chris Jerdonek chris.jerdonek at gmail.com
Wed Aug 30 06:16:42 EDT 2017


https://github.com/python/cpython/commit/bd73e72b4a9f019be514954b1d40e64dc3a5e81c

commit: bd73e72b4a9f019be514954b1d40e64dc3a5e81c branch: master author: Allen W. Smith, Ph.D <drallensmith at users.noreply.github.com> committer: Antoine Pitrou <pitrou at free.fr> date: 2017-08-30T00:52:18+02:00 summary:

... @@ -307,6 +309,10 @@ def imap(self, func, iterable, chunksize=1): )) return result else: + if chunksize < 1:_ _+ raise ValueError(_ _+ "Chunksize must be 1+, not {0:n}".format(_ _+ chunksize))_ _assert chunksize > 1

It looks like removing this assert statement was missed.

--Chris

taskbatches = Pool.gettasks(func, iterable, chunksize) result = IMapIterator(self.cache) @@ -334,7 +340,9 @@ def imapunordered(self, func, iterable, chunksize=1): )) return result else: - assert chunksize > 1 + if chunksize < 1: + raise ValueError( + "Chunksize must be 1+, not {0!r}".format(chunksize)) taskbatches = Pool.gettasks(func, iterable, chunksize) result = IMapUnorderedIterator(self.cache) self.taskqueue.put(



More information about the Python-Dev mailing list