Skip to content

Commit

Permalink
Merge pull request #9 from natalieda/master
Browse files Browse the repository at this point in the history
python 3 support
  • Loading branch information
lnauta authored Aug 16, 2023
2 parents 33e6c04 + e3f78e4 commit 35a29d5
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion picas/clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@author: Jan Bot
@author: Joris Borgdorff
"""
from __future__ import print_function

from .documents import Document
import random
import sys
Expand Down
2 changes: 1 addition & 1 deletion picas/couchdblogger.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@licence: The MIT License (MIT)
@Copyright (c) 2016, Jan Bot
"""
from __future__ import print_function


# Python imports
import logging
Expand Down
4 changes: 2 additions & 2 deletions picas/iterators.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def stop(self):
def is_stopped(self):
return self._stop

def next(self):
def __next__(self):
return self.__next__()

def __next__(self):
Expand Down Expand Up @@ -152,7 +152,7 @@ def is_cancelled(self):
def __next__(self):
while not self.is_cancelled():
try:
return self.iterator.next()
return next(self.iterator)
except StopIteration:
self.iterator.reset()
time.sleep(self.sleep_sec)
Expand Down
6 changes: 3 additions & 3 deletions picas/srm.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
@licence: The MIT License (MIT)
@Copyright (c) 2016, Jan Bot
"""
from __future__ import print_function


# Python imports
import threading
import logging
import Queue
import queue
from os import path

from .executers import execute, execute_old
Expand All @@ -34,7 +34,7 @@ def download_many(files, poolsize=10, logger=None):
be established. Default: 10.
@param logger: a Python logger object. Default: None.
"""
q = Queue.Queue()
q = queue.Queue()
for v in files:
q.put(v)

Expand Down
8 changes: 4 additions & 4 deletions picas/srmclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
@licence: The MIT License (MIT)
@Copyright (c) 2016, Jan Bot
"""
from __future__ import print_function


import threading
import logging
import Queue
import queue

from picas import SRMClient


def download(files, threads=10):
q = Queue.Queue()
for k, v in files.iteritems():
q = queue.Queue()
for k, v in files.items():
q.put(v)

thread_pool = []
Expand Down
2 changes: 1 addition & 1 deletion scripts/example.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python
from __future__ import print_function


from picas.actors import RunActor
from picas.clients import CouchDB
Expand Down

0 comments on commit 35a29d5

Please sign in to comment.